How Unity Object Tags working on multiplayer games?
Hi guys,
I am currently working on a 2D multiplayer rpg project. I am using too many tags in my game to find my objects. My question is how networks handle this functions.
For example; I have a Player gameobject that has a tag "Player" . But in multiplayer, there will be more Player objects (that might have different player IDs and Names like Player#1231, Player#9002 , like ID of players).
-When I am using GameObject.FindObjectWithTag("Player") from other script, which player will return?
-Should i use GameObject.FindObject s WithTag("Player") and search in that array to find my actual player?
-Or that function will understand which player that i am looking for because we are not sending this function to server?
-Bonus Question : What about same question for Object Layers? I wanna add a object to front of the camera and this will be visible only by camera's paren, which is our Player object. How can i handle this? (Example for this Question is simple Fog of War Texture that only shows us a specific area, except this area is full of black. But other players' FogOfWarTexture must not visible for us.)
These questions are driving me crazy because i have a lack of networking knowledge, in my opinion.
Thank you guys.
Best Regards.
Your answer
Follow this Question
Related Questions
UDPClient can't receive and send ? 0 Answers
UNET] How to make server tell all clients to do something? 1 Answer
Best way to learn Networking in general 0 Answers
Are networked object pools possible? 0 Answers