songtao.han Posted May 20, 2021 Share Posted May 20, 2021 (edited) Hi! I've got a problem that I need to load some nodes in a thread created of my own. The code was excuted correctly and the nodes were loaded successfully. But there were nothing displayed in the screen. Strange thing was when I called World.GetNodeByName() in the thread, it worked fine. But when I called World.LoadNode() in the thread, the problem happened. I don't know what to do. Some help please. Edited May 20, 2021 by songtao.han Link to comment
silent Posted May 20, 2021 Share Posted May 20, 2021 songtao.han Long story short - you can't load objects in threads different from the main thread: https://developer.unigine.com/en/docs/2.14.1/code/fundamentals/thread_safety/ 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
songtao.han Posted May 20, 2021 Author Share Posted May 20, 2021 19 minutes ago, silent said: songtao.han Long story short - you can't load objects in threads different from the main thread: https://developer.unigine.com/en/docs/2.14.1/code/fundamentals/thread_safety/ Got it! One more thing, can I use syncker.master.LoadNode() in my thread? Link to comment
silent Posted May 20, 2021 Share Posted May 20, 2021 Similar limitations applies to the Syncker API as well. 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
songtao.han Posted May 20, 2021 Author Share Posted May 20, 2021 21 minutes ago, silent said: Similar limitations applies to the Syncker API as well. Thanks! Link to comment
Recommended Posts