Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Display IComponentData values on UI text

Discussion in 'Entity Component System' started by kro11, Dec 17, 2019.

  1. kro11

    kro11

    Joined:
    Sep 23, 2019
    Posts:
    103
    Is it possible to display component data values on UI text (Canvas) in real time?
     
  2. kro11

    kro11

    Joined:
    Sep 23, 2019
    Posts:
    103
    Use static Fields.
     
  3. OwlchemyDawson

    OwlchemyDawson

    Joined:
    Aug 28, 2018
    Posts:
    21
    Check out the DOTSSample code for an example of UI updating using a Hybrid model with a ComponentSystem.

    Specifically look at the CharacterUISystems.cs and CharacterHealthUI.cs. The CharacterHUD prefab in the project has the GameObject/Entity conversion setup.
     
    edalbeci and kro11 like this.