Search Issue Tracker
NetworkServer is not active Error when trying to spawn a GameObject
Description: There seems to be a problem when trying to spawn a GameObject with Client window. In Client window you can see the object being spawned, but on server side nothing happens. When trying to spawn this GameObject console shows "NetworkServer is not active" error (Image: "Image5.png"). This seems to be a very simple operations but for some reason it doesn't work in this project.
SERVER + CLIENT SETUP:
1. Extract the project.
2. Launch "test.exe" which is located in the extracted folder.
3. Write a player name in field one (can be any name) (Image: "Image1.png").
4. Press "Create Server and Client" button.
5. A new scene should be opened. Mouse over the white flag located in the center of the map and Click on it (Image: "Image2.png").
Note: You should now be spawned on the map.
6. Open project with Unity 5.5.1f1 .
7. In the field 1 write player name (for example "test2") (Image: "Image3.png").
8. In the field 2 write "localhost" (Image: "Image3.png").
9. Press "Connect to server" button.
10. Click on the white flag.
Note: You should now be spawned on the map (Image: "Image4.png").
11. Press 'R' key to raise player hands.
12. Press and hold any mouse key (left or right) for 5 seconds, then release.
Expected results: "FireBall" game object is spawned in Clients scene and Server scene.
Actual results: "FireBall" game object is spawned in Clients scene, but not in Server scene. Console prompts Error: "NetworkServer is not active. Cannot spawn objects without an active server." (Image: "Image5.png").
1. All the Networking in the project seems to be made correctly. It seems all the requirements from http://answers.unity3d.com/questions/987951/unet-networkserverspawn-not-working.html are fulfilled.
2. User said the problem started to appear when he upgraded from 5.4 to 5.5.1f1.
3. These are the main scripts/lines that are responsible for spawning and commanding the server to spawn the game object:
Assets\Resources\Objects\AnimationObjects\Magic\FireBall\Script -> FireBall.cs -> CmdAnimations() function (Commands the server to spawn the game object).
You should probably lower the amount of time you need to hold the mouse button to spawn the "FireBall". You can do that in the same script, line 13.
Reproduces with: 5.5.0p4; 5.5.1p3; 5.6.0b6;
(5.4 can't handle the project)
The project is attached to the duplicate of this case (case number: 878119).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The Rendering Profiler module statistics are zero when Application.targetFrameRate is set
- The Editor becomes unresponsive and memory allocation errors are spammed in the Console when Generating Lightning
- Crash on BatchApplyPropertiesFromSourceAssetDB when opening a specific project
- Scene view Camera cannot be moved with WASD/QE keys when the Right Mouse Button is held down and the Mouse is not moved
- Crash when calling default interface method from virtual method with same name