SetTextUtf8(ReadOnlySpan<byte>)
Sets the text content from a UTF-8 encoded byte sequence without allocating a managed string.
Read time 1 minuteLast updated 11 days ago
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.