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

Sync isActive to other Clients

$
0
0
what i want to do:

when client A presses a button, i want a child of the player character to become active for a short time.

what works so far:

when i press the button, i see the object become active on the client that presses the button and on the server.

i do it this way:

Code (CSharp):
  1.  
  2.         //in Update
  3.         if (Input.GetKeyDown(KeyCode.Space))
  4.         {
  5.             StartCoroutine(Slash());
  6.         }
  7. .
  8.  
  9.     IEnumerator Slash()
  10.     {...
Sync isActive to other Clients

Viewing all articles
Browse latest Browse all 16796

Trending Articles