Search Unity

The Dropdown UI Element does not render DropdownList in a Networked Canvas

Discussion in 'Multiplayer' started by stenfeio, May 2, 2017.

  1. stenfeio

    stenfeio

    Joined:
    Jan 18, 2015
    Posts:
    22
    The DropdownList child gameobject under the Dropdown UI gameobject stops rendering to the screen UI if a NetworkIdentity component is added to it's root Canvas. Any idea why but also, how do I get around this?
     
  2. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    Not sure why that happens, but what I do is have my networked NetworkIdentity objects communicate with a non-networked Canvas. My canvas contains a bunch of singleton children.
     
  3. stenfeio

    stenfeio

    Joined:
    Jan 18, 2015
    Posts:
    22
    Where the user is in the UI is something I want to network. That's why I have the Canvas with a NetworkIdentity. Any ideas about a workaround?
     
  4. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    If the Canvas does not work with NetworkIdentity then use a Canvas without a NetworkIdentity.

    Then you can send information to/from the Canvas from your networked object.

    For example what I do is when a Networked Monster is instantiated, it adds to the Canvas a GUI healthBar. Then constantly feeds health info to the health bar. When the monster is destroyed it removes the healthBar from the Canvas. The canvas is not networked, but it displays networked info contained in the monster's NetworkBehaviour scripts.

    Also you may want to bug report if you think it's a bug.
     
    stenfeio likes this.