void Awake() { instance = this; Player = GameObject.FindGameObjectWithTag("Player"); if (!Player) { throw new Exception("Player object not set in FloatingOrigin script."); } if (!StreamingWorld) { throw new Exception("StreamingWorld not set in FloatingOrigin script."); } playerMotor = Player.GetComponent <PlayerMotor>(); if (!playerMotor) { throw new Exception("Player object does not have a PlayerMotor."); } acrobatMotor = Player.GetComponent <AcrobatMotor>(); if (!acrobatMotor) { throw new Exception("Player object does not have an AcrobatMotor."); } groundMotor = Player.GetComponent <PlayerGroundMotor>(); if (!groundMotor) { throw new Exception("Player object does not have a PlayerGroundMotor."); } }
void Awake() { instance = this; }
void Awake() { instance = this; Player = GameObject.FindGameObjectWithTag("Player"); if (!Player) throw new Exception("Player object not set in FloatingOrigin script."); if (!StreamingWorld) throw new Exception("StreamingWorld not set in FloatingOrigin script."); playerMotor = Player.GetComponent<PlayerMotor>(); if (!playerMotor) throw new Exception("Player object does not have a PlayerMotor."); }
void Awake() { instance = this; }