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>(); } }
void Start() { music = transform.parent.GetComponent <PlayMusicTest>(); msg = GameObject.Find("Controler").GetComponent <MessageReceiver>(); }