How to have objects local to clients? Unet, multi-player game
Hello,
I'm trying to create a mutli-player game using the HLAPI of UNET. I'd like the game to have score text, similar to the roll a ball tutorial. What is the best way to achieve this? I already have an int variable that is controlled by the server, and is updated dynamically any time one of the client's score gets modified. I just want each client to be able to display their own score and their opponent's score.
YOUR SCORE: x
OPPONENT's SCORE: y
I've ran into an issue because my player objects are prefabs. So I tried a hack, representing the scores as 3D Text prefabs, and having a designated prefab for each player. So each player would only use one prefab. This caused a "Failed to find prefab parent for scene object" error. Do I have to register the prefab on the server and have it distribute it to each of the clients? I feel as though I shouldn't have to do that, since the text of each player is unique and doesn't have to be shared with the whole world.
Thank you
Your answer
![](https://koobas.hobune.stream/wayback/20220612062641im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity Multiplayer Disconnection 0 Answers
How to change the turn of a player in an online multiplayer game? 0 Answers
Photon Instantiate Master vs. Local 0 Answers
dedicated server 0 Answers
UNET Clients Laggy 0 Answers