WritingPhraseAsset
public sealed class WritingPhraseAsset : ScriptableObjectAuthored stroke data for one exact shaped phrase and layout fingerprint.
Fields
Section titled “Fields”
CurrentSchemaVersion
Section titled “CurrentSchemaVersion”public const int CurrentSchemaVersion = 1Returns
System.Int32
Methods
Section titled “Methods”
GetCenterlineStroke(int)
Section titled “GetCenterlineStroke(int)”public TextStudioWritingStroke GetCenterlineStroke(int index)Returns an independent copy of the phrase centerline stroke at the specified index.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
Returns
TextStudio.TextStudioWritingStroke
GetOutlineStroke(int)
Section titled “GetOutlineStroke(int)”public TextStudioWritingStroke GetOutlineStroke(int index)Returns an independent copy of the phrase outline stroke at the specified index.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
Returns
TextStudio.TextStudioWritingStroke
Matches(string, ulong)
Section titled “Matches(string, ulong)”public bool Matches(string resolvedText, ulong shapingFingerprint)Checks exact resolved text equality and an equal, nonzero shaping fingerprint before reusing the authored phrase paths.
Parameters
| Name | Type |
|---|---|
resolvedText |
System.String |
shapingFingerprint |
System.UInt64 |
Returns
System.Boolean
SetPhrase(string, ulong, Rect, TextStudioWritingStroke[], TextStudioWritingStroke[])
Section titled “SetPhrase(string, ulong, Rect, TextStudioWritingStroke[], TextStudioWritingStroke[])”public void SetPhrase(string resolvedText, ulong shapingFingerprint, Rect designBounds, TextStudioWritingStroke[] centerlineStrokes, TextStudioWritingStroke[] outlineStrokes = null)Replaces phrase text, shaping identity, bounds, and cloned stroke data, repairs stroke identities, and advances the asset revision.
Parameters
| Name | Type |
|---|---|
resolvedText |
System.String |
shapingFingerprint |
System.UInt64 |
designBounds |
UnityEngine.Rect |
centerlineStrokes |
TextStudio.TextStudioWritingStroke[] |
outlineStrokes |
TextStudio.TextStudioWritingStroke[] |
Constructors
Section titled “Constructors”
WritingPhraseAsset()
Section titled “WritingPhraseAsset()”public WritingPhraseAsset()Properties
Section titled “Properties”
SchemaVersion
Section titled “SchemaVersion”public int SchemaVersion { get; }Returns
System.Int32
Revision
Section titled “Revision”public int Revision { get; }Returns
System.Int32
ResolvedText
Section titled “ResolvedText”public string ResolvedText { get; }Returns
System.String
ShapingFingerprint
Section titled “ShapingFingerprint”public ulong ShapingFingerprint { get; }Returns
System.UInt64
DesignBounds
Section titled “DesignBounds”public Rect DesignBounds { get; }Returns
UnityEngine.Rect
CenterlineStrokeCount
Section titled “CenterlineStrokeCount”public int CenterlineStrokeCount { get; }Returns
System.Int32
OutlineStrokeCount
Section titled “OutlineStrokeCount”public int OutlineStrokeCount { get; }Returns
System.Int32