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

Options
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
        }
    }


}

Comments

  • Haskoman
    Haskoman
    edited October 2016
    Options
    please my friends i need stend why i have id 0 - i try few methode but every time and gain and again and again i have error Illegal view ID:0 method:
  • Haskoman
    Options
    need help please

  • Haskoman
    Options
    help all