Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Resolved Unity Netcode ServerRCP not sent by scene object

Discussion in 'Netcode for GameObjects' started by Shurikend, Aug 25, 2022.

  1. Shurikend

    Shurikend

    Joined:
    Nov 18, 2015
    Posts:
    8
    hey Guys,

    I'm trying to have a door open on all client when any one open it on his side. I tried to send a ServerRCP that send a ClientRCP but it seems that the ServerRCP is not communicating to the server/host properly. Any Idea why it wouldn't work this way ? Here is my code and the scene setup :
    Scene.PNG Code.PNG
     
  2. CosmoM

    CosmoM

    Joined:
    Oct 31, 2015
    Posts:
    204
    Very strange, I don’t see a reason why that doesn’t work. When in play mode, does the networkobject this script is attached to show it’s spawned in the inspector, both when running the editor as a server or as a client?
     
  3. Shurikend

    Shurikend

    Joined:
    Nov 18, 2015
    Posts:
    8
    Ok thanks for confirming that the script logic was good ! it helped be try to understand why the networkobject wouldn't behave like I thought ti would.
    I have a chunk loader system that activates or deactivates gameobjects. I think it was preventing the object to be correctly sent to the server and was only registered locally.
    Disabling it makes it work.

    The script above has no issue (like most of the time it was something else interfering).

    Thanks a lot !