TextStudioColorSource
public sealed class TextStudioColorSourceAn immutable color image with its actual mesh and atlas UVs, expressed in source em coordinates.
Constructors
Section titled “Constructors”
TextStudioColorSource(Texture, Vector2[], Vector2[], int[], float, bool, uint)
Section titled “TextStudioColorSource(Texture, Vector2[], Vector2[], int[], float, bool, uint)”public TextStudioColorSource(Texture texture, Vector2[] positions, Vector2[] uv, int[] triangles, float alphaThreshold = 0.5, bool premultipliedAlpha = false, uint revision = 0)Creates a color-image source from validated, independently copied mesh positions, UVs, and triangles with alpha and revision metadata.
Parameters
| Name | Type |
|---|---|
texture |
UnityEngine.Texture |
positions |
UnityEngine.Vector2[] |
uv |
UnityEngine.Vector2[] |
triangles |
System.Int32[] |
alphaThreshold |
System.Single |
premultipliedAlpha |
System.Boolean |
revision |
System.UInt32 |
Properties
Section titled “Properties”
Texture
Section titled “Texture”public Texture Texture { get; }Returns
UnityEngine.Texture
Positions
Section titled “Positions”public TextStudioReadOnlyBuffer<Vector2> Positions { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{UnityEngine.Vector2}
public TextStudioReadOnlyBuffer<Vector2> Uv { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{UnityEngine.Vector2}
Triangles
Section titled “Triangles”public TextStudioReadOnlyBuffer<int> Triangles { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{System.Int32}
Bounds
Section titled “Bounds”public Rect Bounds { get; }Returns
UnityEngine.Rect
AlphaThreshold
Section titled “AlphaThreshold”public float AlphaThreshold { get; }Returns
System.Single
PremultipliedAlpha
Section titled “PremultipliedAlpha”public bool PremultipliedAlpha { get; }Returns
System.Boolean
Revision
Section titled “Revision”public uint Revision { get; }Backend content revision, in addition to Unity’s texture update counter.
Returns
System.UInt32
IsEmpty
Section titled “IsEmpty”public bool IsEmpty { get; }Returns
System.Boolean