C++RAW #include "UnityPrefix.h" #include "Runtime/Mono/MonoBehaviour.h" #include "Runtime/Graphics/Transform.h" #include "Runtime/Mono/MonoScript.h" #include "Runtime/Mono/MonoManager.h" #include "Runtime/Animation/Animator.h" #include "Runtime/Animation/RuntimeAnimatorController.h" #include "Runtime/Animation/Avatar.h" #include "Runtime/mecanim/human/human.h" #include "Runtime/mecanim/generic/crc32.h" #include "Runtime/Animation/AnimationClip.h" #include "Runtime/Animation/AnimatorOverrideController.h" #include "Runtime/Scripting/ScriptingExportUtility.h" #include "Runtime/Scripting/ScriptingUtility.h" #include "Runtime/Scripting/Scripting.h" using namespace Unity; CSRAW using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Collections; namespace UnityEngine { // Target ENUM AvatarTarget // The root, the position of the game object Root = 0, // The body, center of mass Body = 1, // The left foot LeftFoot = 2, // The right foot RightFoot = 3, // The left hand LeftHand = 4, // The right hand RightHand = 5, END // IK Goal ENUM AvatarIKGoal // The left foot LeftFoot = 0, // The right foot RightFoot = 1, // The left hand LeftHand = 2, // The right hand RightHand = 3 END // Information about what animation clips is played and its weight STRUCT AnimationInfo // Animation clip that is played CSRAW public AnimationClip clip { get {return m_ClipInstanceID != 0 ? ClipInstanceToScriptingObject(m_ClipInstanceID) : null; } } // The weight of the animation clip CSRAW public float weight { get { return m_Weight;}} CUSTOM private static AnimationClip ClipInstanceToScriptingObject(int instanceID) { return Scripting::ScriptingWrapperFor(PPtr(instanceID)); } CSRAW private int m_ClipInstanceID; CSRAW private float m_Weight; END C++RAW struct MonoAnimationInfo { int clipInstanceID; float weight; }; void AnimationInfoToMono ( const AnimationInfo& src, MonoAnimationInfo &dest) { dest.clipInstanceID = src.clip.IsValid() ? src.clip.GetInstanceID() : 0; dest.weight = src.weight; } static int ScriptingStringToCRC32 (ICallString& stringValue); // Culling mode for the Animator ENUM AnimatorCullingMode // Always animate the entire character. Object is animated even when offscreen. AlwaysAnimate = 0, // Animation is disabled when renderers are not visible. BasedOnRenderers = 1 END // Information about the current or next state STRUCT AnimatorStateInfo // Does /name/ match the name of the active state in the statemachine. CSRAW public bool IsName (string name) { int hash = Animator.StringToHash (name); return hash == m_Name || hash == m_Path; } // For backwards compatibility this is actually the path... // In the future it would be good to come up with a new name for the name & path. CSRAW public int nameHash { get { return m_Path; } } // Normalized time of the State CSRAW public float normalizedTime { get { return m_NormalizedTime; } } // Current duration of the state CSRAW public float length { get { return m_Length; } } // The Tag of the State CSRAW public int tagHash { get { return m_Tag; } } // Does /tag/ match the tag of the active state in the statemachine. CSRAW public bool IsTag (string tag) { return Animator.StringToHash (tag) == m_Tag; } // Is the state looping CSRAW public bool loop { get { return m_Loop != 0;} } CSRAW private int m_Name; CSRAW private int m_Path; CSRAW private float m_NormalizedTime; CSRAW private float m_Length; CSRAW private int m_Tag; CSRAW private int m_Loop; END // Information about the current transition STRUCT AnimatorTransitionInfo // Does /name/ match the name of the active Transition. CSRAW public bool IsName (string name) { return Animator.StringToHash (name) == m_Name ; } // Does /userName/ match the name of the active Transition. CSRAW public bool IsUserName (string name) { return Animator.StringToHash (name) == m_UserName ; } // The unique name of the Transition CSRAW public int nameHash { get { return m_Name; } } // The user-specidied name of the Transition CSRAW public int userNameHash { get { return m_UserName; } } // Normalized time of the Transition CSRAW public float normalizedTime { get { return m_NormalizedTime; } } CSRAW private int m_Name; CSRAW private int m_UserName; CSRAW private float m_NormalizedTime; END // To specify position and rotation weight mask for Animator::MatchTarget STRUCT MatchTargetWeightMask // MatchTargetWeightMask contructor CSRAW public MatchTargetWeightMask(Vector3 positionXYZWeight, float rotationWeight) { m_PositionXYZWeight = positionXYZWeight; m_RotationWeight = rotationWeight; } // Position XYZ weight CSRAW public Vector3 positionXYZWeight { get { return m_PositionXYZWeight;} set { m_PositionXYZWeight = value; } } // Rotation weight CSRAW public float rotationWeight { get { return m_RotationWeight;} set { m_RotationWeight =value;} } CSRAW private Vector3 m_PositionXYZWeight; CSRAW private float m_RotationWeight; END C++RAW enum HumanBodyBones { Hips=0, LeftUpperLeg, RightUpperLeg, LeftLowerLeg, RightLowerLeg, LeftFoot, RightFoot, Spine, Chest, Neck, Head, LeftShoulder, RightShoulder, LeftUpperArm, RightUpperArm, LeftLowerArm, RightLowerArm, LeftHand, RightHand, LeftToes, RightToes, LeftEye, RightEye, Jaw, LastBone}; // Interface to control the Mecanim animation system CLASS Animator : Behaviour // Returns true if the current rig is optimizable CUSTOM_PROP bool isOptimizable { return self->IsOptimizable(); } // Returns true if the current rig is ''humanoid'', false if it is ''generic'' CUSTOM_PROP bool isHuman { return self->IsHuman(); } // Returns true if the current generic rig has a root motion CUSTOM_PROP bool hasRootMotion { return self->HasRootMotion(); } // Returns the scale of the current Avatar for a humanoid rig, (1 by default if the rig is generic) CUSTOM_PROP float humanScale { return self->GetHumanScale(); } // Gets the value of a float parameter CSRAW public float GetFloat(string name) { return GetFloatString(name); } // Gets the value of a float parameter CSRAW public float GetFloat(int id) { return GetFloatID(id); } // Sets the value of a float parameter CSRAW public void SetFloat(string name, float value) { SetFloatString(name, value);} // Sets the value of a float parameter CSRAW public void SetFloat(string name, float value, float dampTime, float deltaTime) { SetFloatStringDamp(name, value, dampTime, deltaTime);} // Sets the value of a float parameter CSRAW public void SetFloat(int id, float value) { SetFloatID(id, value);} // Sets the value of a float parameter CSRAW public void SetFloat(int id, float value, float dampTime, float deltaTime) { SetFloatIDDamp(id, value, dampTime, deltaTime); } // Gets the value of a bool parameter CSRAW public bool GetBool(string name) { return GetBoolString(name);} // Gets the value of a bool parameter CSRAW public bool GetBool(int id) { return GetBoolID(id);} // Sets the value of a bool parameter CSRAW public void SetBool(string name, bool value) { SetBoolString(name, value);} // Sets the value of a bool parameter CSRAW public void SetBool(int id, bool value) { SetBoolID(id, value);} // Gets the value of an integer parameter CSRAW public int GetInteger(string name) { return GetIntegerString(name);} // Gets the value of an integer parameter CSRAW public int GetInteger(int id) { return GetIntegerID(id);} // Sets the value of an integer parameter CSRAW public void SetInteger(string name, int value) { SetIntegerString(name, value);} // Sets the value of an integer parameter CSRAW public void SetInteger(int id, int value) { SetIntegerID(id, value); } // Sets the trigger parameter on CSRAW public void SetTrigger(string name) { SetTriggerString(name); } // Sets the trigger parameter at on CSRAW public void SetTrigger(int id) { SetTriggerID(id); } // Resets the trigger parameter at off CSRAW public void ResetTrigger(string name) { ResetTriggerString(name); } // Resets the trigger parameter at off CSRAW public void ResetTrigger(int id) { ResetTriggerID(id); } // Returns true if a parameter is controlled by an additional curve on an animation CSRAW public bool IsParameterControlledByCurve(string name) { return IsParameterControlledByCurveString(name); } // Returns true if a parameter is controlled by an additional curve on an animation CSRAW public bool IsParameterControlledByCurve(int id) { return IsParameterControlledByCurveID(id); } // Gets the avatar delta position for the last evaluated frame CUSTOM_PROP Vector3 deltaPosition { return self->GetDeltaPosition(); } // Gets the avatar delta rotation for the last evaluated frame CUSTOM_PROP Quaternion deltaRotation { return self->GetDeltaRotation(); } // The root position, the position of the game object CUSTOM_PROP Vector3 rootPosition { return self->GetAvatarPosition();} { self->SetAvatarPosition(value);} // The root rotation, the rotation of the game object CUSTOM_PROP Quaternion rootRotation { return self->GetAvatarRotation();} { self->SetAvatarRotation(value);} // Root is controlled by animations CUSTOM_PROP bool applyRootMotion { return self->GetApplyRootMotion(); } { self->SetApplyRootMotion(value); } // When turned on, animations will be executed in the physics loop. This is only useful in conjunction with kinematic rigidbodies. CUSTOM_PROP bool animatePhysics { return self->GetAnimatePhysics(); } { self->SetAnimatePhysics(value); } // Tell if the corresponding Character has transform hierarchy. CUSTOM_PROP bool hasTransformHierarchy { return self->GetHasTransformHierarchy(); } // The current gravity weight based on current animations that are played CUSTOM_PROP float gravityWeight { return self->GetGravityWeight(); } // The position of the body center of mass CUSTOM_PROP Vector3 bodyPosition { return self->GetBodyPosition(); } { self->SetBodyPosition(value); } // The rotation of the body center of mass CUSTOM_PROP Quaternion bodyRotation { return self->GetBodyRotation(); } { self->SetBodyRotation(value); } // Gets the position of an IK goal CUSTOM Vector3 GetIKPosition( AvatarIKGoal goal) { return self->GetGoalPosition(goal) ;} // Sets the position of an IK goal CUSTOM void SetIKPosition( AvatarIKGoal goal, Vector3 goalPosition) { self->SetGoalPosition(goal,goalPosition); } // Gets the rotation of an IK goal CUSTOM Quaternion GetIKRotation( AvatarIKGoal goal) { return self->GetGoalRotation(goal); } // Sets the rotation of an IK goal CUSTOM void SetIKRotation( AvatarIKGoal goal, Quaternion goalRotation) { self->SetGoalRotation(goal, goalRotation); } // Gets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal) CUSTOM float GetIKPositionWeight ( AvatarIKGoal goal) { return self->GetGoalWeightPosition(goal); } // Sets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal) CUSTOM void SetIKPositionWeight ( AvatarIKGoal goal, float value) { self->SetGoalWeightPosition(goal,value); } // Gets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal) CUSTOM float GetIKRotationWeight( AvatarIKGoal goal) { return self->GetGoalWeightRotation(goal); } // Sets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal) CUSTOM void SetIKRotationWeight( AvatarIKGoal goal, float value) { self->SetGoalWeightRotation(goal,value); } // Sets the look at position CUSTOM void SetLookAtPosition(Vector3 lookAtPosition) { self->SetLookAtPosition(lookAtPosition); } //Set look at weights CUSTOM void SetLookAtWeight(float weight, float bodyWeight = 0.00f, float headWeight = 1.00f, float eyesWeight = 0.00f, float clampWeight = 0.50f) { self->SetLookAtBodyWeight(weight*bodyWeight); self->SetLookAtHeadWeight(weight*headWeight); self->SetLookAtEyesWeight(weight*eyesWeight); self->SetLookAtClampWeight(clampWeight); } // Automatic stabilization of feet during transition and blending CUSTOM_PROP bool stabilizeFeet { return self->GetStabilizeFeet(); } { self->SetStabilizeFeet(value);} // The AnimatorController layer count CUSTOM_PROP int layerCount { return self->GetLayerCount(); } // Gets name of the layer CUSTOM string GetLayerName( int layerIndex) { return scripting_string_new(self->GetLayerName(layerIndex)) ; } // Gets the layer's current weight CUSTOM float GetLayerWeight( int layerIndex) { return self->GetLayerWeight(layerIndex) ; } // Sets the layer's current weight CUSTOM void SetLayerWeight( int layerIndex, float weight) { self->SetLayerWeight(layerIndex, weight); } // Gets the current State information on a specified AnimatorController layer CUSTOM AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex) { AnimatorStateInfo info; self->GetAnimatorStateInfo (layerIndex, true, info); return info; } // Gets the next State information on a specified AnimatorController layer CUSTOM AnimatorStateInfo GetNextAnimatorStateInfo(int layerIndex) { AnimatorStateInfo info; self->GetAnimatorStateInfo(layerIndex, false, info); return info; } // Gets the Transition information on a specified AnimatorController layer CUSTOM AnimatorTransitionInfo GetAnimatorTransitionInfo(int layerIndex) { AnimatorTransitionInfo info; self->GetAnimatorTransitionInfo(layerIndex, info); return info; } CONDITIONAL !UNITY_FLASH // Gets the list of AnimationInfo currently played by the current state CUSTOM AnimationInfo[] GetCurrentAnimationClipState (int layerIndex) { dynamic_array clips (kMemTempAlloc); self->GetAnimationClipState(layerIndex, true, clips); return DynamicArrayToScriptingStructArray(clips, GetMonoManager().GetCommonClasses().animationInfo, AnimationInfoToMono); } CONDITIONAL !UNITY_FLASH // Gets the list of AnimationInfo currently played by the next state CUSTOM AnimationInfo[] GetNextAnimationClipState (int layerIndex) { dynamic_array clips (kMemTempAlloc); self->GetAnimationClipState(layerIndex, false, clips); return DynamicArrayToScriptingStructArray(clips, GetMonoManager().GetCommonClasses().animationInfo, AnimationInfoToMono); } // Is the specified AnimatorController layer in a transition CUSTOM bool IsInTransition(int layerIndex) { return self->IsInTransition(layerIndex); } // Blends pivot point between body center of mass and feet pivot. At 0%, the blending point is body center of mass. At 100%, the blending point is feet pivot CUSTOM_PROP float feetPivotActive { return self->GetFeetPivotActive(); } { self->SetFeetPivotActive(value);} // Gets the pivot weight CUSTOM_PROP float pivotWeight { return self->GetPivotWeight(); } // Get the current position of the pivot CUSTOM_PROP Vector3 pivotPosition { return self->GetPivotPosition(); } // Automatically adjust the gameobject position and rotation so that the AvatarTarget reaches the matchPosition when the current state is at the specified progress CUSTOM void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime = 1) { self->MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, targetNormalizedTime); } // Interrupts the automatic target matching CUSTOM void InterruptMatchTarget(bool completeMatch = true) { self->InterruptMatchTarget(completeMatch);} // If automatic matching is active CUSTOM_PROP bool isMatchingTarget{ return self->IsMatchingTarget();} // The playback speed of the Animator. 1 is normal playback speed CUSTOM_PROP float speed { return self->GetSpeed() ; } { self->SetSpeed(value);} // Force the normalized time of a state to a user defined value OBSOLETE warning ForceStateNormalizedTime is deprecated. Please use Play or CrossFade instead. CSRAW public void ForceStateNormalizedTime(float normalizedTime) { Play(0, 0, normalizedTime); } CSRAW public void CrossFade (string stateName, float transitionDuration, int layer = -1, float normalizedTime = float.NegativeInfinity) { CrossFade (StringToHash(stateName), transitionDuration, layer, normalizedTime); } CUSTOM void CrossFade (int stateNameHash, float transitionDuration, int layer = -1, float normalizedTime = float.NegativeInfinity) { self->GotoState(layer, stateNameHash, normalizedTime, transitionDuration); } CSRAW public void Play (string stateName, int layer = -1, float normalizedTime = float.NegativeInfinity) { Play (StringToHash(stateName), layer, normalizedTime); } CUSTOM void Play (int stateNameHash, int layer = -1, float normalizedTime = float.NegativeInfinity) { self->GotoState(layer, stateNameHash, normalizedTime, 0.0F); } // Sets an AvatarTarget and a targetNormalizedTime for the current state CUSTOM void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime) {self->SetTarget((int)targetIndex, targetNormalizedTime);} // Returns the position of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)) CUSTOM_PROP Vector3 targetPosition { return self->GetTargetPosition(); } // Returns the rotation of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)) CUSTOM_PROP Quaternion targetRotation { return self->GetTargetRotation(); } OBSOLETE error use mask and layers to control subset of transfroms in a skeleton CUSTOM bool IsControlled(Transform transform) {return false;} // Returns ture if a transform a bone controlled by human CUSTOM internal bool IsBoneTransform(Transform transform) {return self->IsBoneTransform(transform);} CUSTOM_PROP internal Transform avatarRoot {return Scripting::ScriptingWrapperFor(self->GetAvatarRoot());} // Returns transform mapped to this human bone id CUSTOM Transform GetBoneTransform(HumanBodyBones humanBoneId) {return Scripting::ScriptingWrapperFor(self->GetBoneTransform((int)humanBoneId));} // Controls culling of this Animator component. AUTO_PROP AnimatorCullingMode cullingMode GetCullingMode SetCullingMode // Sets the animator in playback mode CUSTOM void StartPlayback() { self->StartPlayback();} // Stops animator playback mode CUSTOM void StopPlayback() { self->StopPlayback();} // Plays recorded data CUSTOM_PROP float playbackTime {return self->GetPlaybackTime(); } { self->SetPlaybackTime(value);} // Sets the animator in record mode CUSTOM void StartRecording(int frameCount) { self->StartRecording(frameCount);} // Stops animator record mode CUSTOM void StopRecording() { self->StopRecording();} // The time at which the recording data starts CUSTOM_PROP float recorderStartTime { return self->GetRecorderStartTime();} {} // The time at which the recoding data stops CUSTOM_PROP float recorderStopTime { return self->GetRecorderStopTime();} {} // The runtime representation of AnimatorController that controls the Animator CUSTOM_PROP RuntimeAnimatorController runtimeAnimatorController {return Scripting::ScriptingWrapperFor(self->GetRuntimeAnimatorController());} { self->SetRuntimeAnimatorController(value);} C++RAW static int ScriptingStringToCRC32 (ICallString& stringValue) { if(stringValue.IsNull()) return 0; #if ENABLE_MONO const gunichar2* chars = mono_string_chars(stringValue.str); const size_t length = stringValue.Length(); if (IsUtf16InAsciiRange (chars, length)) { return mecanim::processCRC32UTF16Ascii (chars, length); } else #endif { return mecanim::processCRC32 (stringValue.AsUTF8().c_str()); } } // Generates an parameter id from a string THREAD_SAFE CUSTOM static int StringToHash (string name) { return ScriptingStringToCRC32(name); } // Gets/Sets the current Avatar CUSTOM_PROP Avatar avatar {return Scripting::ScriptingWrapperFor(self->GetAvatar());} { self->SetAvatar(value);} C++RAW #define GET_NAME_IMPL(Func,x) \ x value; \ GetSetValueResult result = self->Func(ScriptingStringToCRC32(name), value); \ if (result != kGetSetSuccess) \ self->ValidateParameterString (result, name); \ return value; #define SET_NAME_IMPL(Func) \ GetSetValueResult result = self->Func(ScriptingStringToCRC32(name), value); \ if (result != kGetSetSuccess) \ self->ValidateParameterString (result, name); #define GET_ID_IMPL(Func,x) \ x value; \ GetSetValueResult result = self->Func(id, value); \ if (result != kGetSetSuccess) \ self->ValidateParameterID (result, id); \ return value; #define SET_ID_IMPL(Func) \ GetSetValueResult result = self->Func(id, value); \ if (result != kGetSetSuccess) \ self->ValidateParameterID (result, id); // Internal CUSTOM private void SetFloatString(string name, float value) { SET_NAME_IMPL(SetFloat) } CUSTOM private void SetFloatID(int id, float value) { SET_ID_IMPL (SetFloat) } CUSTOM private float GetFloatString(string name) { GET_NAME_IMPL(GetFloat, float) } CUSTOM private float GetFloatID(int id) { GET_ID_IMPL (GetFloat, float) } CUSTOM private void SetBoolString(string name, bool value) { SET_NAME_IMPL(SetBool) } CUSTOM private void SetBoolID(int id, bool value) { SET_ID_IMPL (SetBool) } CUSTOM private bool GetBoolString(string name) { GET_NAME_IMPL(GetBool, bool) } CUSTOM private bool GetBoolID(int id) { GET_ID_IMPL (GetBool, bool) } CUSTOM private void SetIntegerString(string name, int value) { SET_NAME_IMPL(SetInteger) } CUSTOM private void SetIntegerID(int id, int value) { SET_ID_IMPL (SetInteger)} CUSTOM private int GetIntegerString(string name) { GET_NAME_IMPL(GetInteger, int) } CUSTOM private int GetIntegerID(int id) { GET_ID_IMPL (GetInteger, int) } CUSTOM private void SetTriggerString(string name) { GetSetValueResult result = self->SetTrigger(ScriptingStringToCRC32(name)); if (result != kGetSetSuccess) self->ValidateParameterString (result, name); } CUSTOM private void SetTriggerID(int id) { GetSetValueResult result = self->SetTrigger(id); if (result != kGetSetSuccess) self->ValidateParameterID (result, id); } CUSTOM private void ResetTriggerString(string name) { GetSetValueResult result = self->ResetTrigger(ScriptingStringToCRC32(name)); if (result != kGetSetSuccess) self->ValidateParameterString (result, name); } CUSTOM private void ResetTriggerID(int id) { GetSetValueResult result = self->ResetTrigger(id); if (result != kGetSetSuccess) self->ValidateParameterID (result, id); } CUSTOM private bool IsParameterControlledByCurveString(string name) { GetSetValueResult result = self->ParameterControlledByCurve(ScriptingStringToCRC32(name)); if (result == kParameterIsControlledByCurve) return true; else if (result == kGetSetSuccess) return false; else { self->ValidateParameterString (result, name); return false; } } CUSTOM private bool IsParameterControlledByCurveID(int id) { GetSetValueResult result = self->ParameterControlledByCurve(id); if (result == kParameterIsControlledByCurve) return true; else if (result == kGetSetSuccess) return false; else { self->ValidateParameterID (result, id); return false; } } CUSTOM private void SetFloatStringDamp(string name, float value, float dampTime, float deltaTime) { GetSetValueResult result = self->SetFloatDamp(ScriptingStringToCRC32(name), value, dampTime, deltaTime); if (result != kGetSetSuccess) self->ValidateParameterString (result, name); } CUSTOM private void SetFloatIDDamp(int id, float value, float dampTime, float deltaTime) { GetSetValueResult result = self->SetFloatDamp(id, value, dampTime, deltaTime); if (result != kGetSetSuccess) self->ValidateParameterID (result, id); } // True if additional layers affect the center of mass CUSTOM_PROP bool layersAffectMassCenter {return self->GetLayersAffectMassCenter();} { self->SetLayersAffectMassCenter(value);} // Get left foot bottom height. CUSTOM_PROP float leftFeetBottomHeight {return self->GetLeftFeetBottomHeight();} // Get right foot bottom height. CUSTOM_PROP float rightFeetBottomHeight {return self->GetRightFeetBottomHeight();} CONDITIONAL UNITY_EDITOR CUSTOM_PROP internal bool supportsOnAnimatorMove { return self->SupportsOnAnimatorMove (); } CONDITIONAL UNITY_EDITOR CUSTOM internal void WriteDefaultPose() { self->WriteDefaultPose(); } CUSTOM void Update(float deltaTime) { self->Update(deltaTime);} CONDITIONAL UNITY_EDITOR // Evalutes only the StateMachine, does not write into transforms, uses previous deltaTime // Mostly used for editor previews ( BlendTrees ) CUSTOM internal void EvaluateSM() {self->EvaluateSM();} CONDITIONAL UNITY_EDITOR CUSTOM internal string GetCurrentStateName(int layerIndex) { return scripting_string_new(self->GetAnimatorStateName(layerIndex,true));} CONDITIONAL UNITY_EDITOR CUSTOM internal string GetNextStateName(int layerIndex) { return scripting_string_new(self->GetAnimatorStateName(layerIndex,false));} CUSTOM_PROP private bool isInManagerList { return self->IsInManagerList();} AUTO_PROP bool logWarnings GetLogWarnings SetLogWarnings AUTO_PROP bool fireEvents GetFireEvents SetFireEvents OBSOLETE warning GetVector is deprecated. CSRAW public Vector3 GetVector(string name) { return Vector3.zero; } OBSOLETE warning GetVector is deprecated. CSRAW public Vector3 GetVector(int id) { return Vector3.zero; } OBSOLETE warning SetVector is deprecated. CSRAW public void SetVector(string name, Vector3 value) { } OBSOLETE warning SetVector is deprecated. CSRAW public void SetVector(int id, Vector3 value) { } OBSOLETE warning GetQuaternion is deprecated. CSRAW public Quaternion GetQuaternion(string name) { return Quaternion.identity;} OBSOLETE warning GetQuaternion is deprecated. CSRAW public Quaternion GetQuaternion(int id) { return Quaternion.identity; } OBSOLETE warning SetQuaternion is deprecated. CSRAW public void SetQuaternion(string name, Quaternion value) { } OBSOLETE warning SetQuaternion is deprecated. CSRAW public void SetQuaternion(int id, Quaternion value) { } END CSRAW }