Hi, I’m calling function using Photon RPC but its not working.
private void OnCountdownTimerIsExpired()
{
photonView.RPC(“TurnWheel”, RpcTarget.All);
}
[PunRPC]
public void TurnWheel ()
{
Debug.Log(“TurnWheel”);
_currentLerpRotationTime = 0f;
_sectorsAngles = new float[] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
110, 120, 130, 140, 150, 160, 170, 180, 190, 200,
210, 220, 230, 240, 250, 260, 270, 280, 290, 300,
310, 320, 330, 340, 350, 360 };
int fullCircles = 5;
float randomFinalAngle = _sectorsAngles [UnityEngine.Random.Range (0, _sectorsAngles.Length)];
_finalAngle = -(fullCircles * 360 + randomFinalAngle);
_isStarted = true;
StartCoroutine (UpdateCoinsAmount ());
}