#TextMeshDOTS

1 messages · Page 1 of 1 (latest)

arctic mantle
ancient rapids
#

Is it possible to support dynamic font asset? This is not a feature request, just a curious question.

arctic mantle
#

Not sure, would need to research. Would require logic to trigger rebuild of font blob and update of underlying TextCore font asset, re-registering new atlas material with Entity Graphics etc upon encountering unicodes not currently in the blob. Might be easier/ more performant to just have a static font asset containing the entire font file (all characters!)

arctic mantle
tiny summit
#

how to change text in runtime?

arctic mantle
#

Same as with anything in ECS world: query for the component /buffer you want to change, and change it. In this case the buffer is called CalliString. Just don’t do it every frame, as it would then rebuild the entire text mesh GPU buffer every frame.

tiny summit
#

i tried clear CalliString and reAdd new word, but i failed

#

other buffers are not changed accordingly

arctic mantle
# tiny summit other buffers are not changed accordingly

Thanks for reporting this. Could you check if version 0.9.4 fixes this issue? The reasons for this issue was that I filtered in ShapeSystem.cs on the query for chunks that had changes to BOTH CalliString and TextBaseConfiguration. So none of the jobs in this system will run when only CalliString changes as the query would be empty. Development artefact that should not be in the release, as the decision if a given chunk should be processed or not is actually happening inside each job via chunk.DidChange(...)

arctic mantle
#

https://discussions.unity.com/t/0-9-7-textmeshdots-world-space-dots-native-text/946438/360
0.9.7 Update:

  • Numerous “under the hood” changes
    • Update to newest Harfbuzz (14.1.0)
    • Android support
    • New (faster) rasterizer for SDF, and emoji unlocking any kind of emoji fonts (PNG, SVG, COLRv0, COLRv1)
    • One entity per text renderer thanks to much improved resource management (glyph data, texture arrays)
  • Additional font support: variable fonts, true type collection fonts (ttc)
  • Global FontCollectionAsset (baked), and dropdown font selections per text renderer