// PUBLIC METHODS: ---------------------------------------------------------------------------- public void SetState(RuntimeAnimatorController rtc, AvatarMask mask, float weight, float time, float speed) { if (rtc.GetHashCode() == this.currentStateHash) { this.targetWeight = 1.0f - weight; this.smoothTime = time; Playable input = this.mixer.GetInput(0); if (input.IsValid()) { input.SetSpeed(speed); } } else { this.currentStateHash = rtc.GetHashCode(); this.SetState( (rtc == null ? Playable.Null : AnimatorControllerPlayable.Create(this.graph, rtc)), mask, weight, time, speed ); } }
public override int GetHashCode() { unchecked { var hashCode = (Animator != null ? Animator.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OriginalController != null ? OriginalController.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OverrideCollections != null ? OverrideCollections.GetHashCode() : 0); return(hashCode); } }