Jump to content

[SOLVED] Does Splash still work in 2.2?


photo

Recommended Posts

Hi, I guess now that 2.2 is out, we can start putting 2.2 questions in the regular forum?

 

Anyways, after switching to 2.2, our custom splash code no longer seems to work.  Has something changed with splash?

 

 

theEngine = new EnginePtr(UNIGINE_VERSION, NULL, appPath, NULL, numargs, (char**)args);
 
// create splash
Unigine::Splash* splash = Unigine::Splash::get();
Unigine::App* app = Unigine::App::get();
 
float aspect = float(app->getWidth() / app->getHeight());
if (aspect < 1.5f) {
splash->setSystem("resources/ICEscapes/splash4x3.png", 16);
splash->setWorld("resources/ICEscapes/splash4x3.png", 16);
}
else {
splash->setSystem("resources/ICEscapes/splash16x9.png", 16);
splash->setWorld("resources/ICEscapes/splash16x9.png", 16);
}
 
Link to comment

Well I tried setting up the splash in my UnigineScript init method and it works ok there.  So maybe it's just not working on the c++ side?

 

Also, when I override the splash screen, no progress bar shows on the load.  Is there a way to get the progress bar to show with a custom splash screen?

 

-- Update --

 

All right, I get why it doesn't work now.  If I load the world after I set up Splash in C++, then the system script in the update_splash method will just override what I've done.  So...unless you manually change the system script (which I believe isn't recommended), doesn't the Splash C++ code have no effect, won't it always be overridden by script?

 

Anyways, yeah, I can set up my splash through script just fine so I'm ok.

Link to comment
  • 2 weeks later...

Hi,

 

There was some changes in internal execution sequence.

It's not recommended now to put initialization logic just before the main loop or interleave application callbacks with main loop steps.

In 2.2 you can subscribe to engine events using new callbacks system.

 

You can put splash setup code into the SystemLogic::init() method.

It will be called after system script init() function is executed, so you can override settings made from the script.

Link to comment
×
×
  • Create New...