tolga Posted April 1, 2022 Share Posted April 1, 2022 (edited) Hi! We use NodeReferences as a template for our objects and delete them after we are done with them. We do this repeatedly during the gameplay. In Unigine 2.10, we could do that numerous times. But in 2.15, when we delete the NodeReference once, the nodes or objects inside the NodeReference are gone forever (lose the reference) and we can't use them anymore. Hence, we get a bunch of errors. Is there a trick to this, maybe is there a way to create a copy? Thanks. Edited April 1, 2022 by tolga Link to comment
alexander Posted April 1, 2022 Share Posted April 1, 2022 Hi tolga, "When we delete the NodeReference once, the nodes or objects inside the NodeReference are gone forever" Sounds like normal behavior. Could you provide a small sample with that problem? Best regards, Alexander Link to comment
tolga Posted April 1, 2022 Author Share Posted April 1, 2022 Here's a simple example: String path = "the path to node reference"; NodeReferencePtr node1 = NodeReference::create(path); // Do stuff with the objects inside. node1.deleteForce(); node1.clear(); NodeReferencePtr node2 = NodeReference::create(path); // Try to do stuff with the objects inside. // KABOOOM! Hope it helps. Link to comment
Recommended Posts