API reference

SpaceMapGPU Class

Extends MonoBehaviour
Manages the creation and updating of a SpaceMap using GPU resources.
This class is designed to handle dynamic environments, providing real-time updates to the spatial map.

Fields

CreateOnStart : MRUK.RoomFilter
Signature
MRUK.RoomFilter CreateOnStart
layerMask : LayerMask
Signature
LayerMask layerMask
MapGradient : Gradient
Signature
Gradient MapGradient
TextureDimension : int
Signature
int TextureDimension

Properties

SpaceMapCreatedEvent : UnityEvent
[Get]
Event triggered when the space map is initially created.
Signature
UnityEvent SpaceMapCreatedEvent
SpaceMapUpdatedEvent : UnityEvent
[Get]
Event triggered when the space map is updated.
Signature
UnityEvent SpaceMapUpdatedEvent

Methods

GetColorAtPosition ( worldPosition )
Color clamps to edge color if worldPosition is off-grid.
getBilinear blends the color between pixels.
Signature
Color GetColorAtPosition(Vector3 worldPosition)
Parameters
worldPosition: Vector3  The world position to sample the color from.
Returns
Color  The color at the specified world position. Returns black if the capture camera is not initialized.
StartSpaceMap ( roomFilter )
Initiates the space mapping process based on the specified room filter.
This method sets up the necessary components and configurations to generate the space map, including updating textures, initializing effect meshes, setting up the capture camera, and applying materials.
Signature
async void StartSpaceMap(MRUK.RoomFilter roomFilter)
Parameters
roomFilter: MRUK.RoomFilter  The MRUK.RoomFilter that determines which rooms are included in the space map, influencing how the space map is generated.
Returns
async void