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