Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Toggle object between server and client

$
0
0
I am making a game with UNET that has only two devices (two players). There will be one gameObject that both the players will interact, which will be present in either server side (player 1) or client side (player 2) at any point of time. I don't want both the devices to spawn the gameObject.

How can I toggle the visibility of the gameObject in client, if a bool is true? Please help, it is quite urgent. The bool is a SyncVar

Code (CSharp):
  1.     //P1: Server = true, P2: Client = false...
Toggle object between server and client

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>