// Update is called once per frame void Awake() { Instance = this; timeShown = 0; showDuration = 0; Subtitles = new List <SubtitleTemplate>(); hLayout = SubtitleTextObject.GetComponent <HorizontalLayoutGroup>(); }
private void Awake() { if (Singleton != null && Singleton != this) { Destroy(gameObject); } else { Singleton = this; } }
private void Awake() { if (instance == null) { instance = this; gameObject.SetActive(false); } else { Destroy(this); } }