//Awake is called before the first frame update once and never again void Awake() { #region Getting All Private Components textBoxAnim = textBox.GetComponent <Animator>(); if (sprite != null) { spriteAnim = sprite.GetComponent <Animator>(); } if (sprite != null) { spriteImage = sprite.GetComponent <Image>(); } playerAnim = player.GetComponent <Animator>(); SM = FindObjectOfType <SceneMenuManager>(); #endregion #region Turning Off All Components dialogueText.enabled = false; dialogueText.gameObject.SetActive(false); textBox.SetActive(false); if (sprite != null) { sprite.SetActive(false); } #endregion }
void Awake() { instance = this; }