UnityEditor.PreviewBlendTree.ClearStateMachine C# (CSharp) Method

ClearStateMachine() private method

private ClearStateMachine ( ) : void
return void
        private void ClearStateMachine()
        {
            if ((this.m_AvatarPreview != null) && (this.m_AvatarPreview.Animator != null))
            {
                AnimatorController.SetAnimatorController(this.m_AvatarPreview.Animator, null);
            }
            if (this.m_Controller != null)
            {
                this.m_Controller.OnAnimatorControllerDirty = (Action) Delegate.Remove(this.m_Controller.OnAnimatorControllerDirty, new Action(this, (IntPtr) this.ControllerDirty));
            }
            Object.DestroyImmediate(this.m_Controller);
            Object.DestroyImmediate(this.m_State);
            this.m_StateMachine = null;
            this.m_Controller = null;
            this.m_State = null;
        }