This class has been DEPRECATED starting in Lens Studio 2.3. The Component.MeshVisual typename is now an alias for BaseMeshVisual. When upgrading a project to Lens Studio 2.3 or higher, any instances of the MeshVisual component will be upgraded to RenderMeshVisual.

This class was split into the following three classes, to better distinguish the behaviors of child classes.

BaseMeshVisual: Base class for all visual classes using meshes to render

MaterialMeshVisual: Child class of BaseMeshVisual, gives access to the Materials used to render

RenderMeshVisual: Child class of MaterialMeshVisual, gives access to the RenderMesh used to render

interface MeshVisual {
    enabled: boolean;
    sceneObject: SceneObject;
    uniqueIdentifier: string;
    destroy(): void;
    getSceneObject(): SceneObject;
    getTransform(): Transform;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

If disabled, the Component will stop enacting its behavior.

sceneObject: SceneObject
uniqueIdentifier: string

Methods

  • Destroys the component.

    Returns void

  • Returns the name of this object's type.

    Returns string

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean