private void CreateStateMachine()
{
if (this.m_Controller == null)
{
this.m_Controller = new AnimatorController();
this.m_Controller.pushUndo = false;
this.m_Controller.AddLayer("viz");
this.m_StateMachine = this.m_Controller.layers[0].stateMachine;
this.m_StateMachine.pushUndo = false;
this.CreateParameters();
this.m_State = this.m_StateMachine.AddState("viz");
this.m_State.pushUndo = false;
this.m_State.motion = this.m_BlendTree;
this.m_State.iKOnFeet = false;
this.m_State.hideFlags = HideFlags.HideAndDontSave;
this.m_StateMachine.hideFlags = HideFlags.HideAndDontSave;
this.m_Controller.hideFlags = HideFlags.HideAndDontSave;
AnimatorController.SetAnimatorController(this.m_Animator, this.m_Controller);
this.m_Controller.OnAnimatorControllerDirty = (Action) Delegate.Combine(this.m_Controller.OnAnimatorControllerDirty, new Action(this, (IntPtr) this.ControllerDirty));
this.m_ControllerIsDirty = false;
}
}