Jump to content

[SOLVED] analogue of unity's Dontdestroyonload


photo

Recommended Posts

16 hours ago, Somebody said:

Is there an analogue of unity's Dontdestroyonload in unigine? If not, how to make the same object travel to different scenes?

Hello!

Looks like this issue has been already resolved on our Discord channel? Right?

Thanks!

Link to comment

Information from discord for other users:

The analogue of Dontdestroyonload from unity to unigine is the LIFETIME.ENGINE of the node. Code example:

Node node = new NodeDummy();

node.Lifetime = Node.LIFETIME.ENGINE; // this node will not be deleted when the world is closed. it will live until the engine is finished

https://developer.unigine.com/en/docs/2.15.1/api/library/nodes/class.node?rlang=cs#LIFETIME (arguments)

https://developer.unigine.com/en/docs/2.15.1/api/library/nodes/class.node?rlang=cs#getLifetime_int (methods)

  • Like 2
Link to comment
  • silent changed the title to [SOLVED] analogue of unity's Dontdestroyonload
×
×
  • Create New...