Scripting API
Scripting API
FixedText128
Struct in Abyss.Core, from Abyss.Core.
Text of up to 128 bytes that a struct holds in itself — an item's name in a data asset, a label in a component — plain data, as a component and settings have to be: its UTF-8 and zeros after. The inspector shows it as a box to type in, and a scene and a data asset's file write it as text.
public struct FixedText128Remarks
Made from a string, FixedText128 name = "Sword";, and read back with FixedText128.ToString. A string that takes more than 128 bytes is refused rather than cut: a letter outside ASCII takes two to four. FixedText32, FixedText64, FixedText128 and FixedText256 are the sizes there are.
Constructors
FixedText128
public FixedText128(string? text)Holds text.
Parameters
text
Exceptions
ArgumentException: It takes more thanFixedText128.Capacitybytes, or holds a zero.
Properties
Length
public readonly int Length { get; }How many bytes the text takes.
IsEmpty
public readonly bool IsEmpty { get; }Whether it holds nothing.
Methods
ToString
public override readonly string ToString()The text it holds.
Equals
public readonly bool Equals(FixedText128 other)Parameters
other
Equals
public override readonly bool Equals(object? obj)Parameters
obj
GetHashCode
public override readonly int GetHashCode()Operators
implicit operator string
public static implicit operator string(FixedText128 text)The text text holds.
Parameters
text
implicit operator FixedText128
public static implicit operator FixedText128(string? text)Holds text.
Parameters
text
Exceptions
ArgumentException: It takes more thanFixedText128.Capacitybytes, or holds a zero.
operator ==
public static bool operator ==(FixedText128 left, FixedText128 right)Whether two hold the same text.
Parameters
leftright
operator !=
public static bool operator !=(FixedText128 left, FixedText128 right)Whether two hold other text.
Parameters
leftright
Constants
Capacity
public const int Capacity = 128How many bytes of UTF-8 it has room for.
