RoomExtensions
ThaumielMapEditor.API.Extensions
Overview​
Methods​
| Signature | Returns | Description |
|---|---|---|
GetClosestRoomToPosition(Vector3) | Room | Gets the closest LabApi.Features.Wrappers.Room to the `UnityEngine.Vector3``po… |
GetMaps(Room) | IEnumerable<MapData> | Gets all the spawned maps in this LabApi.Features.Wrappers.Room. |
GetSchematics(Room) | IEnumerable<SchematicData> | Gets all the spawned schematics in this LabApi.Features.Wrappers.Room. |
LocalPosition(Room, Vector3) | Vector3 | Returns the local space position, based on a world space position. |
WorldPosition(Room, Vector3) | Vector3 | Returns the World position, based on a local space position. |
Methods​
GetClosestRoomToPosition​
GetClosestRoomToPosition
public Room GetClosestRoomToPosition(Vector3 pos)
Gets the closest LabApi.Features.Wrappers.Room to the UnityEngine.Vector3``pos
Parameters​
| Name | Type | Description |
|---|---|---|
pos | Vector3 | The position to get the closest room from |
Returns​
Room — LabApi.Features.Wrappers.Room if a room was found else returns null if no room was found
GetMaps​
GetMaps
public IEnumerable<MapData> GetMaps(Room room)
Gets all the spawned maps in this LabApi.Features.Wrappers.Room.
Parameters​
| Name | Type | Description |
|---|---|---|
room | Room |
Returns​
IEnumerable<MapData>
GetSchematics​
GetSchematics
public IEnumerable<SchematicData> GetSchematics(Room room)
Gets all the spawned schematics in this LabApi.Features.Wrappers.Room.
Parameters​
| Name | Type | Description |
|---|---|---|
room | Room |
Returns​
IEnumerable<SchematicData>
LocalPosition​
LocalPosition
public Vector3 LocalPosition(
Room room,
Vector3 position
)
Returns the local space position, based on a world space position.
Parameters​
| Name | Type | Description |
|---|---|---|
room | Room | The room instance this method extends. |
position | Vector3 | World position. |
Returns​
Vector3 — Local position, based on the room.
WorldPosition​
WorldPosition
public Vector3 WorldPosition(
Room room,
Vector3 offset
)
Returns the World position, based on a local space position.
Parameters​
| Name | Type | Description |
|---|---|---|
room | Room | The room instance this method extends. |
offset | Vector3 | Local position. |
Returns​
Vector3 — World position, based on the room.