API reference

EffectMesh Class

Extends MonoBehaviour

Fields

BorderSize : float
Signature
float Meta.XR.MRUtilityKit.EffectMesh.BorderSize
Colliders : bool
Signature
bool Meta.XR.MRUtilityKit.EffectMesh.Colliders
CutHoles : MRUKAnchor.SceneLabels
Signature
MRUKAnchor.SceneLabels Meta.XR.MRUtilityKit.EffectMesh.CutHoles
Labels : MRUKAnchor.SceneLabels
Signature
MRUKAnchor.SceneLabels Meta.XR.MRUtilityKit.EffectMesh.Labels
Layer : int
Signature
int Meta.XR.MRUtilityKit.EffectMesh.Layer
MeshMaterial : Material
Signature
Material Meta.XR.MRUtilityKit.EffectMesh.MeshMaterial
SpawnOnStart : MRUK.RoomFilter
Signature
MRUK.RoomFilter Meta.XR.MRUtilityKit.EffectMesh.SpawnOnStart
textureCoordinateModes : TextureCoordinateModes[]
Signature
TextureCoordinateModes [] Meta.XR.MRUtilityKit.EffectMesh.textureCoordinateModes

Properties

CastShadow : bool
[Get][Set]
Signature
bool Meta.XR.MRUtilityKit.EffectMesh.CastShadow
HideMesh : bool
[Get][Set]
Signature
bool Meta.XR.MRUtilityKit.EffectMesh.HideMesh
ToggleColliders : bool
[Get][Set]
Signature
bool Meta.XR.MRUtilityKit.EffectMesh.ToggleColliders

Methods

AddColliders ( label )
Adds colliders to the mesh objects instantiated based on the provided label filter.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.AddColliders(LabelFilter label=new LabelFilter())
Parameters
label: LabelFilter  The filter to determine which mesh objects receive a collider. If a mesh object's anchor labels pass this filter and the mesh object does not already have a collider, a new collider is added. Default value includes all labels.
Returns
void
CreateEffectMesh ( anchorInfo )
Signature
EffectMeshObject Meta.XR.MRUtilityKit.EffectMesh.CreateEffectMesh(MRUKAnchor anchorInfo)
Parameters
anchorInfo: MRUKAnchor
Returns
EffectMeshObject
CreateMesh ()
Creates effect mesh for all elements in all rooms.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.CreateMesh()
Returns
void
CreateMesh ( room )
Creates effect mesh for all objects in the given room.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.CreateMesh(MRUKRoom room)
Parameters
room: MRUKRoom  The room to apply to
Returns
void
DestroyColliders ( label )
Destroy the colliders of the instantiated mesh objects based on the provided label filter.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.DestroyColliders(LabelFilter label=new LabelFilter())
Parameters
label: LabelFilter  The filter to determine which mesh objects receive a collider. If a mesh object's anchor labels pass this filter and the mesh object does not already have a collider, a new collider is added. Default value includes all labels.
Returns
void
DestroyMesh ( label )
Destroys mesh the objects instantiated based on the provided label filter.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.DestroyMesh(LabelFilter label=new LabelFilter())
Parameters
label: LabelFilter  The filter for mesh object destruction. If a mesh object's anchor labels pass this filter, the mesh object will be destroyed. Default value includes all labels.
Returns
void
DestroyMesh ( room )
Destroys all meshs in the given room and mark the room as not tracked anymore by this class.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.DestroyMesh(MRUKRoom room)
Parameters
room: MRUKRoom  MRUK Room
Returns
void
DestroyMesh ( anchor )
Destroys the meshs associated with the provided anchor and mark the anchor as not tracked anymore by this class.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.DestroyMesh(MRUKAnchor anchor)
Parameters
anchor: MRUKAnchor  MRUK Anchor
Returns
void
GetInsetPositionOffset ( point1 , point2 , point3 , border )
For 2 walls defined by 3 corner points, get the inset position from the inside corner.
Inset Position is "border" meters away from the corner, and relative to point2 It will always point to the "inside" of the room
Signature
Vector3 Meta.XR.MRUtilityKit.EffectMesh.GetInsetPositionOffset(Vector2 point1, Vector2 point2, Vector2 point3, float border)
Parameters
point1: Vector2
point2: Vector2
point3: Vector2
border: float
Returns
Vector3
OverrideEffectMaterial ( newMaterial , label )
Overrides the material of the effect mesh objects instantiated based on the provided label filter.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.OverrideEffectMaterial(Material newMaterial, LabelFilter label=new LabelFilter())
Parameters
newMaterial: Material  The new material to apply to the effect mesh objects.
label: LabelFilter  The filter to determine which effect mesh objects have their material overridden. If an effect mesh object's anchor labels pass this filter, its material is changed to the new material. Default value is a new instance of LabelFilter.
Returns
void
SetEffectObjectsParent ( newParent )
Signature
void Meta.XR.MRUtilityKit.EffectMesh.SetEffectObjectsParent(Transform newParent)
Parameters
newParent: Transform
Returns
void
ToggleEffectMeshColliders ( doEnable , label )
Toggles the colliders of the effect mesh objects.
Creates one if not existing.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.ToggleEffectMeshColliders(bool doEnable, LabelFilter label=new LabelFilter())
Parameters
doEnable: bool  Determines whether the effect mesh objects should have an active collider or not.
label: LabelFilter  The filter to determine which effect mesh objects have their visibility toggled. If an effect mesh object's anchor labels pass this filter, its visibility is toggled according to the 'shouldShow' parameter. Default value includes all labels.
Returns
void
ToggleEffectMeshVisibility ( shouldShow , label , materialOverride )
Toggles the visibility of the effect mesh objects instantiated based on the provided label filter.
Signature
void Meta.XR.MRUtilityKit.EffectMesh.ToggleEffectMeshVisibility(bool shouldShow, LabelFilter label=new LabelFilter(), Material materialOverride=null)
Parameters
shouldShow: bool  Determines whether the effect mesh objects should be visible or not.
label: LabelFilter  The filter to determine which effect mesh objects have their visibility toggled. If an effect mesh object's anchor labels pass this filter, its visibility is toggled according to the 'shouldShow' parameter. Default value includes all labels.
materialOverride: Material  An optional material to apply to the effect mesh objects when their visibility is toggled. If not provided, the material of the mesh objects remains unchanged.
Returns
void
ToggleShadowCasting ( shouldCast , label )
Signature
void Meta.XR.MRUtilityKit.EffectMesh.ToggleShadowCasting(bool shouldCast, LabelFilter label=new LabelFilter())
Parameters
shouldCast: bool
Returns
void

Inner Classes

EffectMeshObject Class

Fields

collider : Collider
Signature
Collider Meta.XR.MRUtilityKit.EffectMesh.EffectMeshObject.collider
effectMeshGO : GameObject
Signature
GameObject Meta.XR.MRUtilityKit.EffectMesh.EffectMeshObject.effectMeshGO
mesh : Mesh
Signature
Mesh Meta.XR.MRUtilityKit.EffectMesh.EffectMeshObject.mesh

TextureCoordinateModes Class

Fields

AnchorUV : AnchorTextureCoordinateMode
Signature
AnchorTextureCoordinateMode Meta.XR.MRUtilityKit.EffectMesh.TextureCoordinateModes.AnchorUV
WallU : WallTextureCoordinateModeU
Signature
WallTextureCoordinateModeU Meta.XR.MRUtilityKit.EffectMesh.TextureCoordinateModes.WallU
WallV : WallTextureCoordinateModeV
Signature
WallTextureCoordinateModeV Meta.XR.MRUtilityKit.EffectMesh.TextureCoordinateModes.WallV

Inner Enums

WallTextureCoordinateModeU Enum

Enumeration Constants

Member
METRIC
METRIC_SEAMLESS
MAINTAIN_ASPECT_RATIO
MAINTAIN_ASPECT_RATIO_SEAMLESS
STRETCH
STRETCH_SECTION

WallTextureCoordinateModeV Enum

Enumeration Constants

Member
METRIC
MAINTAIN_ASPECT_RATIO
STRETCH

AnchorTextureCoordinateMode Enum

Enumeration Constants

Member
METRIC
STRETCH