AMRUKAnchor exposes a SemanticClassifications property, a TArray<FString> containing the label strings assigned to that anchor. You can check whether an anchor has a specific label using AMRUKAnchor::HasLabel(), or query all anchors in a room with a given label using AMRUKRoom::GetAnchorsByLabel().FMRUKLabels struct provides static constants for all supported label strings, such as FMRUKLabels::Floor, FMRUKLabels::Table, and FMRUKLabels::Couch. Use these constants instead of hard-coded strings to avoid typos.// Check whether an anchor has the Floor label
if (Anchor->HasLabel(FMRUKLabels::Floor))
{
// Handle floor anchor
}
// Query all anchors with the Couch label in a room
TArray<AMRUKAnchor*> Couches = Room->GetAnchorsByLabel(FMRUKLabels::Couch);
For a complete working implementation, see the Unreal-Scene sample.
Semantic Label | Description | Geometric Representation |
Room Structure | ||
CEILING | A ceiling | 2D |
DOOR_FRAME | A door frame. Must exist within a wall face | 2D |
FLOOR | A floor | 2D |
INVISIBLE_WALL_FACE | A wall face added by Space Setup to enclose an open room | 2D |
WALL_ART | A piece of wall art. Must exist within a wall face | 2D |
WALL_FACE | A wall face | 2D |
WINDOW_FRAME | A window frame - must exist within a wall face | 2D |
Room Contents | ||
COUCH | A couch | 2D (the seat) and 3D (the volume) |
TABLE | A table | 2D (the tabletop) and 3D (the volume) |
BED | A bed | 2D (the surface) and 3D (the volume) |
LAMP | A lamp | 3D |
PLANT | A plant | 3D |
SCREEN | A screen | 3D |
STORAGE | A storage container | 2D (a single shelf) and 3D (the volume) |
Mesh Objects | ||
GLOBAL_MESH | A triangle mesh of a user’s space captured during Space Setup | |
Unclassified Objects | ||
OTHER | A general volume | 3D |
OTHER type as a fallback. It may not be a type in the future, and an object you label as OTHER may need to be changed in the future.Note: TheFMRUKLabelsstruct defines additional labels beyond those in the Supported Semantic Labels table, includingInnerWallFace,OtherRoomFace, andOpening. Refer to theFMRUKLabelsstruct in the Meta XR Plugin source for the full set of constants.