public void OnDisable() { //Remove the agent from the simulation but keep the reference //this component might get enabled and then we can simply //add it to the simulation again simulator.RemoveAgent(rvoAgent); }