private void DisableBehaviour(BaseBehaviour behaviour) { if (!behaviour.IsEnable() && behaviour.IsLastEnable()) { try { MDebug.LogVerbose("Core" , $"Before execute {behaviour.GetName()}.OnDisable"); behaviour.OnDisable(); MDebug.LogVerbose("Core" , $"After execute {behaviour.GetName()}.OnDisable"); } catch (Exception e) { MDebug.LogError("Core" , $"Execute {behaviour.GetName()}.OnDisable Exception:{e.ToString()}"); } finally { behaviour.SetLastEnable(false); } } }