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

How to sync state of gameobject in the Unity uNet Multiplayer system?

$
0
0
Hi!

So I have a script that enables and disables a line renderer (to show a laser shooting). However when Player 1 shoots Player 2 doesn't see it. Obviously I am not syncing the enable state of the line renderer. What is the best way to do this? Thank you!

In case you're wondering how I'm enabling the laser:

Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.Networking;
  4.  
  5. public class MissileButton : NetworkBehaviour {
  6.  
  7.     [SerializeField]
  8.     Behaviour[]...
How to sync state of gameobject in the Unity uNet Multiplayer system?

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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