private void OnEnable() { m_PreviewPosition = 0; m_MovingPlatform = target as MovingPlatform; if (!EditorApplication.isPlayingOrWillChangePlaymode) { MovingPlatformPreview.CreateNewPreview(m_MovingPlatform); } }
private void OnDisable() { MovingPlatformPreview.DestroyPreview(); }