using Photon.Pun; using System.Collections; using System.Collections.Generic; using UnityEngine; public class CharacterAnimatorParent : MonoBehaviour { PhotonView photonView; CharacterAnimatorController animatorController; private void Awake() { photonView = GetComponent(); animatorController = GetComponentInChildren(); } public void SetRemoteTriggerBasedOnAbility(int animationType) { photonView.RPC(nameof(RPC_SetTriggerBasedOnAbility), RpcTarget.Others, animationType); } [PunRPC] private void RPC_SetTriggerBasedOnAbility(int animationType) { animatorController.SetTriggerBasedOnAbility((AbilityAnimationType)animationType); } }