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

Question about object spawning.

$
0
0
Do we have to instantiate objects on both the client AND server? Or do we just instantiate objects on the server then spawn them?

So far, my code only generates a rectangular map on the host, while the client stays black.

Code (CSharp):
  1.     void Awake () {
  2.         Debug.Log (isClient);
  3.         if (isClient) {
  4.             RegisterPrefabs ();
  5.         }
  6.     }
  7.  
  8.     void Start(){
  9.         Debug.Log (isServer);
  10.         if (isServer) {
  11.             extractMapData ("Assets\\Map Data\\sample_map.txt");...
Question about object spawning.

Viewing all articles
Browse latest Browse all 16796

Latest Images

Trending Articles



Latest Images

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