tolchinski.alexei Posted December 3, 2018 Posted December 3, 2018 I need to work with NodeReference from another .world, which was loaded in code. Unigine::World::get()->loadWorld("../../mission_demo_server/data/mission_demo_server.world"); Unigine::World::get()->setAutoReloadNodeReferences(1); I can get node by getNodeByName(), i can cast to NodeReference, but if i get getReference() for a working with nodes of this NodeReference, it will be return null adress. If i do same in project where this .world is native, it will work rigth. NodeReferencePtr temp_ref = NodeReference::cast(Editor::get()->getNodeByName("triton_test")); m_tnpa = temp_ref->getReference(); Where am I wrong?
silent Posted December 4, 2018 Posted December 4, 2018 Alexei, To safely load nodes with materials from other projects you need to extend filesystem by adding mount points: https://developer.unigine.com/en/docs/2.7.2/principles/filesystem/#mount_points In that case node will be able to load it's content by GUIDs. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts