Illegal view ID:-999 method:
Options
I created & instantiate prefab with Photon View attached on it.
While creating Group i will instantiate prefab it sets view ID of -999.
Proceeding with that ViewID shows an following error:
Illegal view ID:-999 method: sendMessageToServer GO:Communicator(Clone)
UnityEngine.Debug:LogError(Object)
NetworkingPeer:RPC(PhotonView, String, PhotonTargets, Object[]) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:2629)
While creating Group i will instantiate prefab it sets view ID of -999.
Proceeding with that ViewID shows an following error:
Illegal view ID:-999 method: sendMessageToServer GO:Communicator(Clone)
UnityEngine.Debug:LogError(Object)
NetworkingPeer:RPC(PhotonView, String, PhotonTargets, Object[]) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:2629)
0
Comments
-
This seems to be related to being player ID -1. It's a bug Carmine ran into before but I still could use a reproduction case to fix this.
Is that in Offline Mode?0 -
Is that you are asking Host Type?
Host Type is set as Photon Cloud.
I am Beginner for this Multilayer networking concept and totally confusing in the implementation of PUN into my project.
In Workers Demo By Giving join room will directly enters into Game scene. But in my case it will be similar to the game 'Battle monkeys' .
Host/Server: Created Room and waits for Clients to Connect.(At this time List of Player only contains Host name.)
Client : Joined to the particular room. and waits for host to starts play.(After client joined into the Server. Host and client details displayed in list. But, How could i send this details into server to update its list. )
I am stuck in this part.
Help to solve this?????0 -
@Tobias
Can you tell me why PhotonViewId is moving to Negative like(-999)????
I still getting this error. . .0 -
See above: I need a reproduction project to be able to find the cause.
I don't see how this can happen, except when you are allocating views while you're not yet in a room.0 -
I'm seeming to be having the same problem, 6 years later! I made a forum post about it. Need some help too! Thanks.Tobias said:See above: I need a reproduction project to be able to find the cause.
I don't see how this can happen, except when you are allocating views while you're not yet in a room.0 -
Is there any help to this?
I got the same problem. As soon as I Initiate prefabs with Photon Views, I'm getting ID's like this. (-999, -998 etc.)0 -
Hi @blanx,
Thank you for choosing Photon!
What PUN version are you using?
As @Tobias already hinted:
Each newly assigned PhotonView ID is calculated from the actor number (player ID) in the room and MAX_VIEW_ID and view IDs counter per actor.
So -999 is calculated from: -1 (actor number) * 1000 (MAX_VIEW_ID) + 1 (first view ID for this actor).
The issue is in the actor number which should be > 0.
As long as we don't have minimal repro steps we can only guess and give pointers/hints.
Actor number is -1 when you are not joined to an online room.
So if you are not in offline mode, make sure to try to instantiate network prefabs w/ PhotonView too early.
Wait until the client is actually joined to a room (OnJoinedRoom callback).1 -
Hey @JohnTube
Thanks for the response, that was actually the answer. My Prefabs were Initiated before I joined a room.
Making my Start() a IEnumerator fixed it.
This I my solution for everyone who needs it:private IEnumerator Start() { yield return new WaitUntil(() => PhotonNetwork.InRoom); GameObject go = PhotonNetwork.Instantiate(......); }
0