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?
↧