- Home /
How to test single scenes with UNET?
We started adding a multiplayer mode to our singleplayer game, using UNET. So far we use the NetworkManager to load online scenes from an offline scene and this works fine.
However, if we want to test an "online scene" standalone (just hit the play button, without switching to an offline scene before and starting a host), UNET automatically deactivates all GameObjects which have a NetworkIdentity attached. This then leads to problems in the initialization of the level.
Is there a way to tell Unity to not automatically deactivate the objects or event treat this scene as an online scene, even without starting a server?
Have you tried using NetworkServer.SpawnObjects(); on the server when loading the same level in your case?
Answer by Dreamaster · Jul 25, 2015 at 01:05 AM
I'm not sure if I follow your question right, but I'm working from a single scene just fine, simply have the NetworkManager and NetworkManagerHUD on the one "online scene" and fill the offline and online scene slots with this same scene on the manager.
Your answer
![](https://koobas.hobune.stream/wayback/20220611231723im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Why can Android send commands via NetworkManager but iOS cannot? 0 Answers
uNet Offline and Online Scenes the Same 2 Answers
Offline testing a player object? 0 Answers
How to send large messages through UNET 0 Answers