Skip to main content

ClutterObject

class ThaumielMapEditor.API.Blocks.ServerObjects

Overview​

Properties​

NameTypeAccessDescription
BaseSpawnableClutterConnectorgetGets the MapGeneration.RoomConnectors.SpawnableClutterConnector component attached to the ThaumielMapEditor.API.Blocks.ServerObjects.ClutterObject.ClutterGameObject.
ClutterGameObjectGameObjectgetGets the underlying UnityEngine.GameObject of this clutter object.
ObjectTypeObjectTypeget setNo description
TypeClutterTypegetGets the ThaumielMapEditor.API.Enums.ClutterType of this clutter object.

Methods​

SignatureReturnsDescription
GetClutterPrefab(ClutterType)GameObjectGets the UnityEngine.GameObject prefab associated with the given `ThaumielMapE…
SpawnObject(SchematicData, SerializableObject)voidSpawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server…

Properties​

Base​

Type: SpawnableClutterConnector Access: get

Gets the MapGeneration.RoomConnectors.SpawnableClutterConnector component attached to the ThaumielMapEditor.API.Blocks.ServerObjects.ClutterObject.ClutterGameObject.

note

This will be null if the clutter type does not have a MapGeneration.RoomConnectors.SpawnableClutterConnector component, such as ThaumielMapEditor.API.Enums.ClutterType.BrokenElectricalBox.


ClutterGameObject​

Type: GameObject Access: get

Gets the underlying UnityEngine.GameObject of this clutter object.


ObjectType​

Type: ObjectType Access: get set


Type​

Type: ClutterType Access: get

Gets the ThaumielMapEditor.API.Enums.ClutterType of this clutter object.


Methods​

GetClutterPrefab​

GetClutterPrefab
public GameObject GetClutterPrefab(ClutterType type)

Gets the UnityEngine.GameObject prefab associated with the given ThaumielMapEditor.API.Enums.ClutterType."

Parameters​

NameTypeDescription
typeClutterType

Returns​

GameObject β€” UnityEngine.GameObject

Exceptions​

warning
  • System.ArgumentOutOfRangeException

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