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

DontDestroyOnLoad vs Hideflags.DontSave

$
0
0
What's the difference between DontDestroyOnLoad vs Hideflags.DontSave. I have an audio system in form of a scriptable object. It has some functions like PlaySfx or PlayMusic that other objects can call. When the game first starts, the scriptable object will create a placeholding object to hold an AudioSource component. So it's obvious that I want this placeholding object to be persistent for the hold game. Should I use DontDestroyOnLoad or Hideflags.DontSave in this example? Another situation that I may have is my pooling system. I want to allocate many objects at the beginning of the game and need it to stay persistent across all scenes. What's should I use in this instance?

Viewing all articles
Browse latest Browse all 416

Trending Articles



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