SetTextUtf8(ReadOnlySpan<byte>)
Sets the text content from a UTF-8 encoded byte sequence without allocating a managed string.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public void SetTextUtf8(ReadOnlySpan<byte> utf8)
Parameters
The UTF-8 encoded bytes to set as the element's text content.
Remarks
This method is slower than its UTF-16 counterparts since transcoding is unavoidable. Prefer using TextElement.SetText when possible.