CameraObject
ThaumielMapEditor.API.Blocks.ServerObjects
Overviewβ
Propertiesβ
| Name | Type | Access | Description |
|---|---|---|---|
Base | Scp079CameraToy | get | The underlying in game camera toy instance. |
HorizontalConstraint | Vector2 | get set | Horizontal rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkHorizontalConstraint. |
Label | string | 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 | ObjectType | get set | Gets or sets the type of the object represented by this instance. |
Room | Room | 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 | CameraType | get | The camera prefab type (mapped to a specific prefab via ThaumielMapEditor.API.Blocks.ServerObjects.CameraObject.GetCameraPrefab(ThaumielMapEditor.API.Enums.CameraType)). |
VerticalConstraint | Vector2 | get set | Vertical rotation constraint applied to the camera. When set, the value is copied to AdminToys.Scp079CameraToy.NetworkVerticalConstraint. |
ZoomConstraint | Vector2 | get set | Zoom constraint for the camera (min/max). When set, the value is copied to AdminToys.Scp079CameraToy.NetworkZoomConstraint. |
Methodsβ
| Signature | Returns | Description |
|---|---|---|
GetCameraPrefab(CameraType) | Scp079CameraToy | Returns the corresponding camera prefab instance for the provided type. |
ParseValues(SerializableObject) | void | Parses values from a ThaumielMapEditor.API.Serialization.SerializableObject an⦠|
SpawnObject(SchematicData, SerializableObject) | void | Spawns 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β
public Scp079CameraToy GetCameraPrefab(CameraType type)
Returns the corresponding camera prefab instance for the provided type.
Parametersβ
| Name | Type | Description |
|---|---|---|
type | CameraType | The camera type to resolve to a prefab. |
Returnsβ
Scp079CameraToy β The matching AdminToys.Scp079CameraToy prefab from ThaumielMapEditor.API.Helpers.PrefabHelper.
Exceptionsβ
- ``System.ArgumentOutOfRangeException
β Thrown when an unknowntypeis provided.
ParseValuesβ
public void ParseValues(SerializableObject serializable)
Parses values from a ThaumielMapEditor.API.Serialization.SerializableObject and applies them to this instance.
Parametersβ
| Name | Type | Description |
|---|---|---|
serializable | SerializableObject | The serialized camera object to parse. |
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β
| Name | Type | Description |
|---|---|---|
schematic | SchematicData | |
serializable | SerializableObject |