Exemple #1
0
 private void Awake()
 {
     _light = transform.Find("Light").GetComponent <LightScript>() ?? throw new Exception();
 }
Exemple #2
0
 void Awake()
 {
     _player = GameObject.Find("Player").GetComponent <PlayerMovement>() ?? throw new Exception();
     _light  = transform.Find("Light").GetComponent <LightScript>() ?? throw new Exception();
 }