Scripting API

Scripting API

FixedText64

Struct in Abyss.Core, from Abyss.Core.

Text of up to 64 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 FixedText64

Remarks

Made from a string, FixedText64 name = "Sword";, and read back with FixedText64.ToString. A string that takes more than 64 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

FixedText64

public FixedText64(string? text)

Holds text.

Parameters

  • text

Exceptions

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(FixedText64 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(FixedText64 text)

The text text holds.

Parameters

  • text

implicit operator FixedText64

public static implicit operator FixedText64(string? text)

Holds text.

Parameters

  • text

Exceptions

operator ==

public static bool operator ==(FixedText64 left, FixedText64 right)

Whether two hold the same text.

Parameters

  • left
  • right

operator !=

public static bool operator !=(FixedText64 left, FixedText64 right)

Whether two hold other text.

Parameters

  • left
  • right

Constants

Capacity

public const int Capacity = 64

How many bytes of UTF-8 it has room for.