Jump to content

getReference() for NodeReference from another .world return NULL


photo

Recommended Posts

Posted

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();

2.thumb.png.94f9fcada24cf643b8849b36a3477b7e.png1.thumb.png.578556b8a9a1839b00921b79f7e028cd.png

Where am I wrong?

×
×
  • Create New...