Hellooo all,
i have flashlight in my player, but after spawn photon view take id 0 ????????? why????????
llegal view ID:0 method: Flashlighonoff GO:Flashlight_Light
help me please
i have flashlight in my player, but after spawn photon view take id 0 ????????? why????????
llegal view ID:0 method: Flashlighonoff GO:Flashlight_Light
help me please
using UnityEngine;
public class Flashlightonoff : Photon.MonoBehaviour
{
public PhotonView PhotonView;
public Light light; //assign gameobject with light component attached
void Update()
{
PhotonView.RPC("Flashlighonoff", PhotonTargets.AllBuffered, null);
Debug.Log(this.light);
}
[PunRPC]
void Flashlighonoff()
{
if (cInput.GetButton("onoff")) // on/off light input L
{
light.enabled = !light.enabled; //changes light on/off
}
}
}