void Start() { episode_controller = GameObject.Find("EpisodeController").GetComponent <EpisodeController> (); agent_player1_red = episode_controller.GetPlayer1Ref(true); agent_player2_red = episode_controller.GetPlayer2Ref(true); agent_player1_green = episode_controller.GetPlayer1Ref(false); agent_player2_green = episode_controller.GetPlayer2Ref(false); Debug.Log(agent_player1_red == null); }