Skip to content

Switch entirely to Textmesh Pro #108

@cs-util

Description

@cs-util

Many of the UI components that cscore provides still use the old TextMesh and since its considered deprecated switch over entirely for all of these to Textmesh Pro. This would ensure performance improvements of all UIs and also better readability of the text elements. Please add a comment if you see any potential drawbacks with this.

The best backwards compatible way to do this that would not break existing projects using the current approach would be to introduce new prefabs that the current presenters could just switch to transparently.

And Textmesh Pro has to be added as a mandatory new dependency of cscore to the Unity manifest, which should be fine.

The main code change that would be needed is to extend the UI Link map with returning for text objects a generic wrapper interface (or maybe there is already a common interface between the Text and TextMesh Pro text classes?).
That approach would also allow developers who currently use the UI Link map for their own UIs to switch to text mesh Pro in their own UI prefabs at any time without having to change their code.

ThemeColor is another cscore component that needs to learn to work not only with Text instances but also with TextMesh Pro instances. The .ApplyColor method needs to be extended to support it.

I will prepare a draft on a new branch to make that idea more clear but won’t implement it for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions