Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Unity Multiplayer NetworkBehaviour class gets disabled???

Discussion in 'Multiplayer' started by Royall, Jun 29, 2015.

  1. Royall


    Jun 15, 2013
    I have a controller object with:
    Code (CSharp):
    1. void Awake() {
    2.         DontDestroyOnLoad(transform.gameObject);
    3.     }
    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:
    Code (CSharp):
    1. public class Controller : NetworkBehaviour {
    Code (CSharp):
    1. public class Controller : MonoBehaviour {
    I need NetworkBehaviour cause I want to use: 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... :(
    Last edited: Jun 29, 2015
  2. Hacky


    Mar 22, 2013
    JA5PAR likes this.