Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Network identity game objects are disable

Discussion in 'Game Design' started by MFKJ, Jan 30, 2017.

  1. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    My problem is that Network identity game objects are disable when loading new additive scene in uNet. I am loading an additive scene thorugh this code across network at all clients:

    Code (CSharp):
    1. [ClientRpc]publicvoidRpcLoadLevelAcrossNetwork(){
    2. {
    3. SceneManager.LoadSceneAsync(sceneName,LoadSceneMode.Additive);
    4.  
    5. }
    I has loaded my scene at clients but the object with network identiy are disable. I checked Unity UNetSceneObjects states that:

    All objects in the scene with a NetworkIdentity component will be disabled when the scene is loaded; on both the client and the server. Then, when the scene is fully loaded, NetworkServer.SpawnObjects() is called to activate these networked scene objects. This will be done automatically by the NetworkManager when the server scene finishes loading - or can be called directly by user code.

    As documentation state that it will automatically activate the Network Identity objects but it did not happen in my context. What i am doing wrong? I also tried to activate the object my self through calling NetworkServer.SpawnObjects() in my new loaded scene but it only spawning the object on server side while showing the error at client

    Spawn scene object not found for 1

    and this list is long 2,3,4,...2715. i guess it representing all my network identiy objects.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,041