コード例 #1
0
 // Update is called once per frame
 void Awake()
 {
     Instance     = this;
     timeShown    = 0;
     showDuration = 0;
     Subtitles    = new List <SubtitleTemplate>();
     hLayout      = SubtitleTextObject.GetComponent <HorizontalLayoutGroup>();
 }
コード例 #2
0
 private void Awake()
 {
     if (Singleton != null && Singleton != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Singleton = this;
     }
 }
コード例 #3
0
ファイル: SubtitleUI.cs プロジェクト: GWesterdijk/GGJ2021
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         gameObject.SetActive(false);
     }
     else
     {
         Destroy(this);
     }
 }