- Home /
This question was
closed Feb 07, 2014 at 11:00 AM by
Benproductions1 for the following reason:
Duplicate Question
Question by
nightbane30 · Feb 07, 2014 at 01:47 AM ·
c#music
C# DontDestroyonLoad How?
This is a very noobish question, I know that. I just seem to be having so many problems with DontDestroyonLoad, so I'm asking this as a last resort. I'm creating a game and I want a music file to be playing during the entire game, without restarting itself, with the music starting at my mainmenu scene. I thought I would use DontDestroyonLoad for this, but I'm having issues with it. How exactly do you reference a game object when using DontDestroyonLoad? Does it have to be inside of a void with the game object name? Also, all the examples I could find were in JS, but I'd really appreciate it if someone could show me an example is C#. Sorry if the question isn't very clear :/
Thanks for all the help, guys.
Comment