- Home /
Duplicate Question
Not instantiating?
I have a NeworkManager script for my Unity MultiPlayer game, but i have some problems.
I get this error "NullReferenceException: Object reference not set to an instance of an object NetworkManager.SpawnPlayer () (at Assets/Photon Unity Networking/Resources/NetworkManager.cs:91) NetworkManager.OnServerInitialized () (at Assets/Photon Unity Networking/Resources/NetworkManager.cs:44) UnityEngine.Network:InitializeServer(Int32, Int32, Boolean) NetworkManager:StartServer() (at Assets/Photon Unity Networking/Resources/NetworkManager.cs:38) NetworkManager:OnGUI() (at Assets/Photon Unity Networking/Resources/NetworkManager.cs:20) "
When i spawn my player in, i go to the hierarchy and select my player to see if everything instantiated correctly, and look at this:
Here is the script: http://pastebin.com/3Gcxpz5D
Follow this Question
Related Questions
Null Reference exception bug? 0 Answers
Pause Script Suddenly Stops Working 0 Answers
Trying to find() an image in canvas & getting NullReferenceException 1 Answer
Null LineRenderer in gameobjects with the same script 1 Answer
Help with multiplayer chat functionality, null reference exception using networkmanager 0 Answers