Illegal view ID:0 method: LoadPlayer GO:Networking Manager

Idk i can't seem to wipe this error out. Plus I get it twice when the scene loads for some reason. Everything works fine except I get this error in my log.

It only does it on this GameObject. I Instatiate other photonViews with no errors.
Its a prefab that gets Instantiated but not photonNetwork.Instatiated.

So thats the only difference. My other photonViews that don't give errors are characters in the game that are all PhotonNetwork.Instatiated.


Illegal view ID:0 method: LoadPlayer GO:Networking Manager
UnityEngine.Debug:LogError(Object)
NetworkingPeer:RPC(PhotonView, String, PhotonTargets, PhotonPlayer, Boolean, Object[]) (at Assets/Scripts/Third Party Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3561)
PhotonNetwork:RPC(PhotonView, String, PhotonTargets, Boolean, Object[]) (at Assets/Scripts/Third Party Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2892)
PhotonView:RPC(String, PhotonTargets, Object[]) (at Assets/Scripts/Third Party Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:597)
c__Iterator0:MoveNext() (at Assets/Scripts/Random/SpawnPlayer.cs:139)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Comments

  • TobiasTobias admin
    > Its a prefab that gets Instantiated but not photonNetwork.Instatiated.

    Means you have a PhotonView on this GO but don't use our Instantiate() method?
    That's the explanation.
    Our Instantiate() variant makes sure the PhotonView is setup correctly, even before Awake() gets called on the new GO instance.

    You need to assign a viewID manually (in best case, the same on all clients in a room) or will get this error.
  • Thanks man.
    Ahh ok i bet you are right then. Thats probably it. I think i am Instantiating a prefab that has photonView attached to it with out photon Instantiate. Infact I believe its exactly two prefabs which is why im getting two errors.
  • ShadowingShadowing
    edited June 2
    sweet Thanks Tobias.
    That fixed my issue.
    I would of never of guessed that was the issue lol.


  • TobiasTobias admin
    Hehe. Means I have to work on the error messages ;)
    Glad we could solve this!
Sign In or Register to comment.