API reference

EffectMesh Class

Extends MonoBehaviour
This class handles dynamic mesh and collider generation based on scene elements.

Fields

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

Properties

CastShadow : bool
[Get][Set]
Gets or sets a value indicating whether the effect mesh objects should cast shadows.
true if effect mesh objects should cast shadows; otherwise, false.
Signature
bool CastShadow
HideMesh : bool
[Get][Set]
Gets or sets a value indicating whether the effect mesh objects should be hidden.
true if effect mesh objects should be hidden; otherwise, false.
Signature
bool HideMesh
ToggleColliders : bool
[Get][Set]
Gets or sets a value indicating whether colliders for the effect mesh objects should be active.
true if colliders for effect mesh objects should be active; otherwise, false.
Signature
bool ToggleColliders

Methods

AddColliders ( label )
Adds colliders to the mesh objects instantiated based on the provided label filter.
Signature
void 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 )
Creates an effect mesh for a specified anchor using the default border size.
Signature
EffectMeshObject CreateEffectMesh(MRUKAnchor anchorInfo)
Parameters
anchorInfo: MRUKAnchor  The anchor information used to create the effect mesh.
Returns
EffectMeshObject  An instance of EffectMeshObject representing the created effect mesh or null if the mesh could not be created.
CreateMesh ()
Creates effect mesh for all elements in all rooms.
Signature
void CreateMesh()
Returns
void
CreateMesh ( room )
Creates effect mesh for all objects in the given room.
Signature
void 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 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 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 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 DestroyMesh(MRUKAnchor anchor)
Parameters
anchor: MRUKAnchor  MRUK Anchor
Returns
void
OverrideEffectMaterial ( newMaterial , label )
Overrides the material of the effect mesh objects instantiated based on the provided label filter.
Signature
void 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 )
Utility function that sets the parent transform for all effect mesh objects managed by this class.
Signature
void SetEffectObjectsParent(Transform newParent)
Parameters
newParent: Transform  The new parent transform to which all effect mesh objects will be attached.
Returns
void
ToggleEffectMeshColliders ( doEnable , label )
Toggles the colliders of the effect mesh objects.
Creates one if not existing.
Signature
void 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 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 )
Toggles the shadow casting behavior of effect mesh objects based on the specified label filter.
Signature
void ToggleShadowCasting(bool shouldCast, LabelFilter label=new LabelFilter())
Parameters
shouldCast: bool  Determines whether shadows should be cast by the effect mesh objects.
label: LabelFilter  A filter that specifies which effect mesh objects should have their shadow casting toggled. The default is a new instance of LabelFilter, which includes all labels.
Returns
void

Inner Classes

EffectMeshObject Class

Represents an object that holds the components necessary for an effect mesh.
Encapsulates the GameObject, Mesh, and Collider components used to create and manage effect meshes.

Fields

collider : Collider
Signature
Collider collider
effectMeshGO : GameObject
Signature
GameObject effectMeshGO
mesh : Mesh
Signature
Mesh mesh

TextureCoordinateModes Class

Represents the texture coordinate modes for walls and anchors and defines how texture coordinates are calculated for different surfaces based on specified modes.

Fields

Signature
AnchorTextureCoordinateMode AnchorUV
Signature
WallTextureCoordinateModeU WallU
Signature
WallTextureCoordinateModeV WallV

Inner Enums

WallTextureCoordinateModeU Enum

Defines the modes for calculating texture coordinates along the U-axis (horizontal) for wall textures.

Enumeration Constants

Member
METRIC
METRIC_SEAMLESS
MAINTAIN_ASPECT_RATIO
MAINTAIN_ASPECT_RATIO_SEAMLESS
STRETCH
STRETCH_SECTION

WallTextureCoordinateModeV Enum

Defines the modes for calculating texture coordinates along the V-axis (vertical) for wall textures.

Enumeration Constants

Member
METRIC
MAINTAIN_ASPECT_RATIO
STRETCH

AnchorTextureCoordinateMode Enum

Defines the modes for calculating texture coordinates for anchor surfaces.

Enumeration Constants

Member
METRIC
STRETCH