Search Unity

Resolved NetworkTransform issue

Discussion in 'Netcode for GameObjects' started by AnKOu, Jul 16, 2021.

  1. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    123
    Hello

    I have an application where multiple clients connect to one server.
    Both clients and server load the same scenes.

    Is it possible to have the NetworkObjects in the scene from the begining ? I mean without instantiate them

    Actually, on my client side : all the NetworkObject have an InstanceId assigned automatically ( by Mlapi ) when I enter playmode.
    All the NetworkTransform teleport themself at origin automatically (which is a huge problem).

    On my server side, I have no informations on the NetworkObjects inspector and I need to click on "spawn" to get them.

    But clicking spawn instanciate them on my client side and I don't want that...
    Futhermore, the instanciated prefabs all have their instanceid set to 0 and a unique networkId.

    Am I stuck ? Do I need to change a lot of thing because there is no other way than instanciating NetworkObject ?

    If it is the case, what does it means :
    upload_2021-7-16_16-1-18.png

    Thank you for your help
     
    Last edited: Jul 16, 2021
  2. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    123
    Ok I was starting the client too soon. (before all the network object were loaded)
    Now I wait for all the needed scenes to load before starting and it works.