Search Unity

Pure ECS and Text

Discussion in 'Entity Component System' started by Celes_Eternal, Nov 11, 2018.

  1. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    Hello guys,
    I just want to display text in a 3d world (not some HUD), with ECS. First I just want to display the position on some hexagonal cells, which are entities. Seems like there is still nothing for it, so should I create some data with a mesh and a texture, and create a system to draw on the texture? Don't have a clue of how to do it though ^^ Big newbie spotted!
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Well, pure ECS is in weird state right now. I don't think you can do it full pure. For things like UI you'd have to go hybrid, since there's no way to sync data properly without some MonoBehaviours involved.

    Unless you really want to make the whole text asset processing on your own (which, you shouldn't).
     
  3. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    Or maybe I should create a Text, and using a system to link the transform of the entity? Or does it need a monobehavior to exist at all? Well I'll try it if you're saying that doing the whole processing isn't a good idea.
     
  4. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    You could probably just use some number and letter textures and then draw them on quads or sprites for simple things although going hybrid with prefab tiles with UI built in will probably be easier.

    Also there is the Tilemapping system built into Unity that does hexagonal cells.
     
  5. YurySedyakin

    YurySedyakin

    Joined:
    Jul 25, 2018
    Posts:
    63
  6. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    When was it not?
     
    nicolasgramlich likes this.