i creating a deticated server game where server create multiple room at the same time while client can join to their respective game . i cant use scene switch in server and i want to have a prefab for each room but now if i instantiate a prefab it goes to all the player . i want the prefab to be instantiated to the player only inside that specific room inside the room (ie room specific prefabs)
#room specific prefab spawning
12 messages · Page 1 of 1 (latest)
To handle that you simply need to spawn the object in the correct scene on the server and then correctly use the Scene Observer Condition
no server cannot use multiple scene . server should stay in the same scene while i can use that prefab to change the scene for the players
Okay, so you want all the objects to be in the same scene on the server, but exist in different scenes on the clients?
You could use the match observer condition to achieve that
Basically add the objects and clients to specific matches and then each one would only see the objects it shares a match with
is there any elabrate documentation or example for it
Not really yet, but the API for it is pretty simple: https://firstgeargames.com/FishNet/api/api/FishNet.Component.Observing.MatchCondition.html
ok thank you
how to add client and object to a specific match , i am kind of new to fishnet and the observer concept. in my game the server will create a lot of room for each set of player so i have to add then runtime . i sa the doc its saying addtomatch but i cant understand add to which match can you hel me with it
any do have any idea for iit?
So the matches can be anything you like, it's up to you