NetworkBehaviour class gets disabled???

I have a controller object with:

void Awake() {
        DontDestroyOnLoad(transform.gameObject);
    }

So it remembers settings outside the menu scene...
When moving on to the world scene the object gets disabled when I use NetworkBehaviour instead of Monobehaviour:

public class Controller : NetworkBehaviour {
public class Controller : MonoBehaviour {

I need NetworkBehaviour cause I want to use: http://docs.unity3d.com/ScriptReference/Networking.NetworkBehaviour-isServer.html to do a simple check...

What is the problem?

Edit: Seems like it get's disabled when there is a network identity attached... Problem is I have to attach one will networkbehaviour work... :(

Scene-GameObjects with NetworkIdentity will be deactivated until you are connected to a server.
http://docs.unity3d.com/Manual/UNetSceneObjects.html

May be you are loading this scene when you are connected to a server.

1 Like