protected void Awake() { cachedTransform = transform; animationStateMachine = gameObject.GetComponent <RuntimeBaseUnitSm>(); animationStateMachine.Animator = this; SpeedFactor = 1; FrameTime = -1; m_frameIndexId = Shader.PropertyToID("frameIndex"); }
protected void Awake() { m_cachedTransform = transform; m_meshRenderer = gameObject.GetComponent <MeshRenderer>(); m_animationStateMachine = gameObject.GetComponent <RuntimeBaseUnitSm>(); m_animationStateMachine.Animator = this; m_particleBoneNames = new List <string>(); m_particleBoneTransforms = new List <Transform>(); SpeedFactor = 1; FrameTime = -1; }
private void OnDestroy() { animationStateMachine = null; }