Photon Network RPC Random Range Problem
Hi, I'm working on a project. I'm using this script for bot money;
using UnityEngine;
using System.Collections;
public class Botmoney : MonoBehaviour {
public int BotMoney;
public bool botStealable = true;
PhotonView photonView;
// Use this for initialization
void Start () {
photonView = GetComponent ();
photonView.RPC ("RandomMoneyFBot", PhotonTargets.All);
}
[punRPC]
void RandomMoneyFBot(){
BotMoney = Random.Range (12,60);
}
}
Hi, I'm working on a project. I'm using this script for bot money;
using UnityEngine;
using System.Collections;
public class Botmoney : MonoBehaviour {
public int BotMoney;
public bool botStealable = true;
PhotonView photonView;
// Use this for initialization
void Start () {
photonView = GetComponent ();
photonView.RPC ("RandomMoneyFBot", PhotonTargets.All);
}
[punRPC]
void RandomMoneyFBot(){
BotMoney = Random.Range (12,60);
}
}