private void Awake() { if (Instance == null) { Instance = this; } // Be the one }
// Use this for initialization private void Start() { menuSounds = gameObject.GetComponent <AudioSource>(); tutPopups = GameObject.Find("Controller").GetComponent <TutorialPopups>(); playerScript = GameObject.Find("Player").GetComponent <PlayerControls>(); if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { onMobile = true; } else { onMobile = false; } }