Skip to main content

TextToyObject

class ThaumielMapEditor.API.Blocks.ServerObjects

Overview​

Properties​

NameTypeAccessDescription
BaseTextToygetThe instantiated runtime AdminToys.TextToy associated with this server object.
DisplaySizeVector2get setThe display size (width, height) used by the AdminToys.TextToy when rendering text.
ObjectTypeObjectTypeget setGets or sets the type of the object represented by this instance.
Textstringget setThe text format string used by the AdminToys.TextToy for rendering text.

Methods​

SignatureReturnsDescription
ParseValues(SerializableObject)voidParses values from the provided `ThaumielMapEditor.API.Serialization.Serializabl…
SpawnObject(SchematicData, SerializableObject)voidSpawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server…
SpawnObject(SchematicData)voidNo description

Properties​

Base​

Type: TextToy Access: get

The instantiated runtime AdminToys.TextToy associated with this server object.

note

It will be null until ThaumielMapEditor.API.Blocks.ServerObjects.TextToyObject.SpawnObject(ThaumielMapEditor.API.Data.SchematicData,ThaumielMapEditor.API.Serialization.SerializableObject) successfully instantiates the prefab.


DisplaySize​

Type: Vector2 Access: get set

The display size (width, height) used by the AdminToys.TextToy when rendering text.

note

Setting this property updates the underlying ThaumielMapEditor.API.Blocks.ServerObjects.TextToyObject.Base instance's DisplaySize if the runtime object has already been created.


ObjectType​

Type: ObjectType Access: get set

Gets or sets the type of the object represented by this instance.


Text​

Type: string Access: get set

The text format string used by the AdminToys.TextToy for rendering text.

note

Setting this property updates the underlying ThaumielMapEditor.API.Blocks.ServerObjects.TextToyObject.Base instance's TextFormat if the runtime object has already been created.


Methods​

ParseValues​

ParseValues
public void ParseValues(SerializableObject serializable)

Parses values from the provided ThaumielMapEditor.API.Serialization.SerializableObject and applies them to this instance.

Parameters​

NameTypeDescription
serializableSerializableObjectThe serialized object containing keys such as "TextFormat" and "DisplaySize".

SpawnObject​

SpawnObject
public void SpawnObject(
SchematicData schematic,
SerializableObject serializable
)

Spawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server and adds it to the provided ThaumielMapEditor.API.Data.SchematicData's ThaumielMapEditor.API.Data.SchematicData.SpawnedServerObjects list.

Parameters​

NameTypeDescription
schematicSchematicData
serializableSerializableObject

SpawnObject​

SpawnObject
public void SpawnObject(SchematicData schematic)

Parameters​

NameTypeDescription
schematicSchematicData