Search Unity

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

Question Enabling and Disabling Objects??

Discussion in 'Netcode for GameObjects' started by notMateo, Jul 26, 2023.

  1. notMateo

    notMateo

    Joined:
    Mar 2, 2018
    Posts:
    36
    How am I expected to disable a game object using Netcode for GameObjects?

    I have a nested nested nested nested nested UI element that I need it's position synchronized, as well as it being disabled, but I also need one of it's parents sync'd as well. How am I expected to do that without making every single little thing a Network Prefab?
     
  2. lavagoatGG

    lavagoatGG

    Joined:
    Apr 16, 2022
    Posts:
    226
    I think the UI should mostly not be a network object. You can create another network object outside the UI and user Server and Client RPCs to chagne the position of the UI elements
     
  3. notMateo

    notMateo

    Joined:
    Mar 2, 2018
    Posts:
    36
    Will look into this; I think Server and Client RPCs were the missing piece to my puzzle. Thanks.