- Home /
UI buttons for clients in a multiplayer game?
the game is still very simple.
There are some canvas in World Space Mode where the players have to interact with.
The problem is that only the player that is running the server can interact with the buttons (or entire canvas). all the clients can not.
Is not that the code is not working, is the button itself that does not react.
I tried to addes to some butons & some canvas Network.Identity and activate the "Player Authority", but nothing different happens...
Some help? idea? recomendation?
thaanks:D
Answer by tormentoarmagedoom · Jan 04, 2018 at 01:35 PM
Well, after some days of madness, I found a solution. Maybe there is another solution for the problem, but this worked.
All Space world Canvas that needs to be clicked by a player, are now childs (in the hierarchy) of the Player GameObject that network spawns for each player. The main player object and all the canvas have now a NetworkIdentity component with the "Player Authority" property active.
Then i just move all the canvas to the world position i need. This way, all canvas can be clicked by the player owning them.
:D
Your answer
Follow this Question
Related Questions
May I control the game of a client through pressing some GuiButtons in the server application? 1 Answer
How do i control An Object between Server and Client 0 Answers
Client movements not registering on Server 1 Answer
Photon.Instantiate being called twice in OnloadedLevel and/or OnroomJoin 2 Answers