API reference
API reference
Select your platform
No SDKs available
No versions available

SpaceMap Class

Extends MonoBehaviour
Space Map generates a 2D top-down texture of the room’s layout.
Parameters are exposed for complete RGBA control of the texture creation.

Fields

MRUK.RoomFilter CreateOnStart[Get]
Texture2D TextureMap[Get]
Gradient MapGradient[Get]
float InnerBorder[Get]
float OuterBorder[Get]
float MapBorder[Get]

Properties

The center of the texture.
Note that Offset.y aligns with Unity's Z.
The dimensions of the texture, including the MapBorder.
Note that Scale.y aligns with Unity's Z.

Member Functions

Calculates the space map for the specified room or all rooms if no room is specified.
Initializes map values, starts the pixel calculation process, and updates global shader properties.
Parameters
room
The room to calculate the map for. If null, calculates for all rooms.
A surface-relative value of how far a position is from all SceneAPI surfaces negative values are behind the surface i.e.
outside of the room or inside a volume
Parameters
room
The room to check the surface distance in.
worldPosition
The world position to check.
Returns
The distance to the nearest surface.
Resets the pixel colors of the space map to black, effectively clearing any previously calculated data.
Color clamps to edge color if worldPosition is off-grid.
getBilinear blends the color between pixels.
Parameters
worldPosition
The world position to get the color for.
getBilinear
If true, blends the color between pixels. If false, clamps to the nearest pixel color.
Returns
The color at the specified position.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon