Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Feature Request Add SetCharArray-like support for ReadOnlySpan<char>

Discussion in 'UGUI & TextMesh Pro' started by Nanmu, Feb 24, 2023.

  1. Nanmu

    Nanmu

    Joined:
    Aug 20, 2018
    Posts:
    4
    There was a similar request for Span support about a year ago that was marked as resolved, but there hasn't been any Span/ReadOnlySpan support added to TMP yet. Now that 2021 LTS is just about to become the oldest supported version it would be great to add support to TMP_Text for setting text via ReadOnlySpan<char>. The usage could be identical to how SetCharArray is currently used. The only difference is the function would take a ReadOnlySpan<char> rather than a char[]. It's unfortunate to have to embed the package to support minor additions like this.
     
  2. Nanmu

    Nanmu

    Joined:
    Aug 20, 2018
    Posts:
    4
    Is this forum still the appropriate place to make feature requests? Adding support for this is trivial if you're willing to embed TMP in your project, but it would be significantly more convenient for TMP to support it by default.