Beispiel #1
0
 void Start()
 {
     if (GetComponent <PlayImageTest>() != null)
     {
         img = GetComponent <PlayImageTest>();
     }
     else if (GetComponent <PlayVideoTest>() != null)
     {
         video = GetComponent <PlayVideoTest>();
     }
     else if (GetComponent <PlayMusicTest>() != null)
     {
         music = GetComponent <PlayMusicTest>();
     }
 }
Beispiel #2
0
 void Start()
 {
     video = transform.parent.GetComponent <PlayVideoTest>();
     msg   = GameObject.Find("Controler").GetComponent <MessageReceiver>();
 }