Jump to content

[SOLVED] Execution Sequence


photo

Recommended Posts

Hi there

 

As we can see, in quite all of the examples you load the world in the AppSystemLogic member function init(). Does this mean, that there is a sequence how the different init functions get called? I mean, the init() member function in AppWorldLogic refers to the content loaded with the world file, right?

 

Kind regards,

Renato

Link to comment

Hi Renato,

 

Since Unigine 2.2 version the logic implementing of C++ and C# application has a different approach.

From now you don't need to interfere the main loop of the engine by yourself, the engine provides you classes which should be inherited.

The logic of these classes is the same as for runtime scripts:

WorldLogic class has the same logic as world script.

SystemLogic class has the same logic as system script.

EditorLogic class has the same logic as editor script.

 

New classes' methods are called automatically by engine after equivalent scripts' methods.

 

More info and a detailed execution sequence will be available in docs, that is planned to be updated tomorrow.

 

Article about new logic system: https://developer.unigine.com/en/docs/2.1.1/current/code/execution_sequence/app_logic_system

Link to comment
  • 2 months later...

Hi there

 

I'm creating a new thread in the SystemLogic derived class and want to join it at the end of the application life cycle. But my application crashes as soon as I create the thread. But if I detach the thread after creating it, my application runs. Did you foresee that we can't create new threads inside the Logic derived classes? Or do I oversee something?

 

Kind regards,

Renato

Link to comment

Hi Andrey

 

I have to revisit my own code, since my test sample is running as expected..

 

Thanks for the hint with the test scene.

 

kind regards,

Renato

Link to comment
×
×
  • Create New...