Description

The base class for all components. Components are attached to SceneObjects.

Example

//@input Component component
if(script.component.isOfType("Component.MaterialMeshVisual")){
var mat = script.component.mainMaterial;
}
interface Component {
    enabled: boolean;
    uniqueIdentifier: string;
    destroy(): void;
    getSceneObject(): SceneObject;
    getTransform(): Transform;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

Description

If disabled, the Component will stop enacting its behavior.

uniqueIdentifier: string

Methods

  • Returns void

    Description

    Destroys the component.

  • Returns SceneObject

    Description

    Returns the SceneObject the component is attached to.

  • Returns Transform

    Description

    Returns the Transform this component is attached to.

  • Parameters

    • type: string

    Returns boolean

    Description

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

  • Parameters

    Returns boolean

    Description

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

Generated using TypeDoc