Quantcast
Channel: Answers for "Singleton class always returning null"
Browsing latest articles
Browse All 6 View Live

Answer by Bunny83

Well, it's most likely that your AdjustSettings Awake is called before your GameMusic Awake function. Another possible reason is that you don't have a GameMusic script attached to any object or that...

View Article



Answer by fafase

You 'd rather go for a Singleton class: public class SingletonMonoBehaviour:MonoBehaviour where T : MonoBehaviour { protected T instance = null; public T Instance{ get{ if(instance == null) { instance...

View Article

Answer by Mapleman

I really don't see the need for singleton class here. I'v set up my background music basicly the same way you are trying to do it, but without any singleton stuff. So, since you have your Audio...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images