// Token: 0x06005AC2 RID: 23234 RVA: 0x001FA728 File Offset: 0x001F8B28 private void DetachAnimatorControllerFrom(VRC.Player player) { AnimatorControllerManager componentInChildren = player.GetComponentInChildren <AnimatorControllerManager>(); if (componentInChildren != null) { componentInChildren.Pop(); } }
// Token: 0x06005ABE RID: 23230 RVA: 0x001FA5EC File Offset: 0x001F89EC private void AttachAnimatorControllerTo(VRC.Player player, RuntimeAnimatorController rac) { AnimatorControllerManager componentInChildren = player.GetComponentInChildren <AnimatorControllerManager>(); if (componentInChildren != null && rac != null) { componentInChildren.Push(rac); } else { Debug.LogError("Failed to attach animator controller to " + player.name + ".", this); } }
// Token: 0x06004F6D RID: 20333 RVA: 0x001AD778 File Offset: 0x001ABB78 private IEnumerator RagdollSetupCoroutine() { yield return(null); if (this.avatarAnimator == null) { this.RagdollSetup = null; yield break; } AnimatorControllerManager acm = base.GetComponent <AnimatorControllerManager>(); RuntimeAnimatorController rac = this.avatarAnimator.runtimeAnimatorController; this.avatarAnimator.runtimeAnimatorController = acm.tPoseController; this.avatarAnimator.Update(0f); BipedRagdollReferences r = BipedRagdollReferences.FromAvatar(this.avatarAnimator); Vector3 headScale = r.head.localScale; r.head.localScale = Vector3.one; BipedRagdollCreator.Options options = BipedRagdollCreator.AutodetectOptions(r); BipedRagdollCreator.Create(r, options); r.head.localScale = headScale; foreach (Transform transform in r.GetRagdollTransforms()) { if (!(transform == null)) { Rigidbody component = transform.GetComponent <Rigidbody>(); if (component != null) { this.rigidBodies.Add(component); component.isKinematic = true; component.collisionDetectionMode = CollisionDetectionMode.Continuous; } } } this.avatarAnimator.runtimeAnimatorController = rac; this.avatarAnimator.Update(0f); this.RagdollSetup = null; yield break; }