Skip to main content

CameraObject

class ThaumielMapEditor.API.Blocks.ServerObjects

Overview​

Properties​

NameTypeAccessDescription
BaseScp079CameraToygetThe underlying in game camera toy instance.
HorizontalConstraintVector2get setHorizontal rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkHorizontalConstraint.
Labelstringget setDisplay label for the camera. Setting this property updates the networked label on the underlying ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Base when available.
ObjectTypeObjectTypeget setGets or sets the type of the object represented by this instance.
RoomRoomget setThe ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Room that the camera belongs to. Setting this property updates AdminToys.Scp079CameraToy.NetworkRoom on ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Base.
TypeCameraTypegetThe camera prefab type (mapped to a specific prefab via ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.GetCameraPrefab(ThaumielMapEditor.API.Enums.CameraType)).
VerticalConstraintVector2get setVertical rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkVerticalConstraint.
ZoomConstraintVector2get setZoom constraint for the camera (min/max). When set, the value is copied to AdminToys.Scp079CameraToy.NetworkZoomConstraint.

Methods​

SignatureReturnsDescription
GetCameraPrefab(CameraType)Scp079CameraToyReturns the corresponding camera prefab instance for the provided type.
ParseValues(SerializableObject)voidParses values from a ThaumielMapEditor.API.Serialization.SerializableObject an…
SpawnObject(SchematicData, SerializableObject)voidSpawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server…

Properties​

Base​

Type: Scp079CameraToy Access: get

The underlying in game camera toy instance.


HorizontalConstraint​

Type: Vector2 Access: get set

Horizontal rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkHorizontalConstraint.


Label​

Type: string Access: get set

Display label for the camera. Setting this property updates the networked label on the underlying ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Base when available.


ObjectType​

Type: ObjectType Access: get set

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


Room​

Type: Room Access: get set

The ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Room that the camera belongs to. Setting this property updates AdminToys.Scp079CameraToy.NetworkRoom on ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.Base.


Type​

Type: CameraType Access: get

The camera prefab type (mapped to a specific prefab via ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.GetCameraPrefab(ThaumielMapEditor.API.Enums.CameraType)).


VerticalConstraint​

Type: Vector2 Access: get set

Vertical rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkVerticalConstraint.


ZoomConstraint​

Type: Vector2 Access: get set

Zoom constraint for the camera (min/max). When set, the value is copied to AdminToys.Scp079CameraToy.NetworkZoomConstraint.


Methods​

GetCameraPrefab​

GetCameraPrefab
public Scp079CameraToy GetCameraPrefab(CameraType type)

Returns the corresponding camera prefab instance for the provided type.

Parameters​

NameTypeDescription
typeCameraTypeThe camera type to resolve to a prefab.

Returns​

Scp079CameraToy β€” The matching AdminToys.Scp079CameraToy prefab from ThaumielMapEditor.API.Helpers.PrefabHelper.

Exceptions​

warning
  • ``System.ArgumentOutOfRangeExceptionβ€” Thrown when an unknowntype is provided.

ParseValues​

ParseValues
public void ParseValues(SerializableObject serializable)

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

Parameters​

NameTypeDescription
serializableSerializableObjectThe serialized camera object to parse.

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