//---------------------------------------------------------------------------------------------------------------------- private void DrawLimitedAnimationGUI(SceneCachePlayableAsset scPlayableAsset) { SceneCachePlayer scPlayer = scPlayableAsset.GetSceneCachePlayer(); bool disableScope = null == scPlayer; if (null != scPlayer) { disableScope |= (!scPlayer.IsLimitedAnimationOverrideable()); } if (disableScope) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.HelpBox( "Disabled because Limited Animation settings on the SceneCache GameObject is enabled, or the playback mode is set to interpolate", MessageType.Warning ); if (GUILayout.Button("Fix", GUILayout.Width(64), GUILayout.Height(36))) { scPlayer.AllowLimitedAnimationOverride(); Repaint(); } EditorGUILayout.EndHorizontal(); } using (new EditorGUI.DisabledScope(disableScope)) { SceneCachePlayerEditorUtility.DrawLimitedAnimationGUI(scPlayableAsset.GetOverrideLimitedAnimationController(), m_scPlayableAsset, scPlayer); } }