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

[SOLVED] Add prefab to "Registered Spawnable Prefabs" list via script not working well

$
0
0
Hello,

I am trying to add in NetworkManager a prefab in the Registered Spawnable Prefabs list, but when I add the prefab this appears like (clone), and in client side the prefab it isn't spawn and an error is throw.

Here is my code:
Code (CSharp):
  1. using UnityEngine;
  2. using UnityEngine.Networking;
  3. using System.Collections;
  4.  
  5. public class EmptyPlayer : NetworkBehaviour {
  6.  
  7.     public GameObject playerObj;
  8.  
  9.     public override void OnStartLocalPlayer()
  10.     {
  11.         if (isServer)
  12.         {...
[SOLVED] Add prefab to "Registered Spawnable Prefabs" list via script not working well

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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