public override bool StartPreview() { if (previewing) { return(true); } if (!canPreview) { return(false); } AnimationMode.StartAnimationMode(GetAnimationModeDriver()); AnimationPropertyContextualMenu.Instance.SetResponder(this); Undo.postprocessModifications += PostprocessAnimationRecordingModifications; PrefabUtility.allowRecordingPrefabPropertyOverridesFor += AllowRecordingPrefabPropertyOverridesFor; DestroyGraph(); CreateCandidateClip(); //If a hierarchy was created and array reorder happen in the inspector prior //to the preview being started we will need to ensure that the display name //reflects the binding path on an array element. state.UpdateCurvesDisplayName(); IAnimationWindowPreview[] previewComponents = FetchPostProcessComponents(); m_UsesPostProcessComponents = previewComponents != null && previewComponents.Length > 0; if (previewComponents != null) { // Animation preview affects inspector values, so make sure we ignore constrain proportions ConstrainProportionsTransformScale.m_IsAnimationPreview = true; foreach (var component in previewComponents) { component.StartPreview(); } } return(true); }