Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

every time i have error Illegal view ID:0 method: Flashlighonoff GO:Flashlight_Light

$
0
0
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
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
}
}


}

Viewing all articles
Browse latest Browse all 15755

Trending Articles