public static void Stop <T>(this BehaviorController behavior_controller) where T : Behavior { Behavior behavior = behavior_controller.GetBehavior <T>(); if (behavior == null) { return; } behavior.CleanUp(); GameObject.Destroy(behavior); behavior_map[behavior_controller][typeof(T)] = null; }