renato.semadeni Posted March 7, 2016 Share Posted March 7, 2016 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
maxi Posted March 9, 2016 Share Posted March 9, 2016 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
renato.semadeni Posted May 23, 2016 Author Share Posted May 23, 2016 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
silent Posted May 23, 2016 Share Posted May 23, 2016 Hi Renato, Any test code for reproduction? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
renato.semadeni Posted May 23, 2016 Author Share Posted May 23, 2016 Puuh... I will prepare you a test scene. =) Link to comment
renato.semadeni Posted May 23, 2016 Author Share Posted May 23, 2016 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
Recommended Posts