Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

GameObject::scene and DontDestroyOnLoad()

$
0
0
Hi, If I assign a `GameObject` to the `DontDestroyOnLoad()` method and then call `print(gameObject.scene.name)` it prints out *"DontDestroyOnLoad"* instead of the scene name. Is there a way to get the scene in which the object was created after assigning it to `DontDestroyOnLoad()`? I know it can be done prior but I'm looking for a way to check after without storing a variable. Thanks,

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>