- Home /
Question by
unity_D7DC64B46965257EB90D · Jan 07 at 12:17 PM ·
unity 5multiplayerphotonmultiplayer-networkingpun
Photon RPC is not working in photon?
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 ());
}
Comment
Answer by unity_D7DC64B46965257EB90D · Jan 10 at 04:49 AM
Yes, The "TurnWheel" function isn't being calling