Jump to content

[SOLVED] World Loading screen


photo

Recommended Posts

Posted

How can we remove the 'LOADING' screen that appears while a world is being loaded?

Is this in some way related to the splash screen?

Posted

You can customise the splash screen by using following functions:

engine.splash.setSystem("splash.png");

engine.splash.setWorld("splash.swf");

Posted

We are showing a custom loading screen with a progress bar and that's the reason we wanted to disable/override the LOADING screen. I had tried

 

engine.splash.setEnabled( 0 );

and this did not seem to have any effect, the LOADING screen still came up.

It'd be nice if engine.splash.setEnabled( 0 ) worked as expected.

I also tried

 

 

engine.splash.setSplash( 0 );

like the documentation suggested but still the LOADING screen came up.

So, in short, how can we disable the splash screen?

Posted

If these functions are in your world script then your world is probably loading before you set anything to do with the splash screen. Try setting up your splash screens in the system script or a similar approach before loading your world

Posted

We did put it in the system script, in Unigine.cc

 

int init()

{

systemInit();

engine.splash.setEnabled( 0 );

Posted

Sorry I hadn't actually tried diabling splashes completely, I just had system script code that changed the textures which isn't really what your looking for so a solution I don't currently have.

 

int init() 


{
   engine.splash.setSystem(textures/splash.png");
   engine.splash.setWorld(textures/splash2.png");
   systemInit();
   return 1;
}

Posted

You will have to create a black texture and set it for a system script (in unigine.cpp) if you do not want anything at all to be rendered:

 

engine.splash.setSystem("my_black_texture.png");

LOADING text splash is automatically used if no texture-based splash screen is set. Therefore, this won't do the trick:

 

// LOADING splash will be shown
engine.splash.setSystem(0);

 

engine.splash.setEnabled() function cannot disable a system splash on loading. It is used when you want to render a splash screen at an arbitrary moment of time. It only goes together with corresponding render functions (engine.splash.renderSystem(), engine.splash.renderWorld() or engine.splash.renderSplash()). Basically, what it does is set the flag for the engine that the application should not do all the usual routine in the update-render-swap cycle, but only render a splash screen instead. Click on any of the render functions mentioned above for an example how it is supposed to be used. I've updated descriptions for them to be more clear.

×
×
  • Create New...