Cluster Creator Kit Script Reference
    Preparing search index...

    Interface PlayerLocalObjectPlayer

    The handle of the object which can be referred in Player Script.

    interface PlayerLocalObject {
        name: string;
        findObject(name: string): PlayerLocalObject | null;
        getEnabled(): boolean;
        getTotalEnabled(): boolean;
        getUnityComponent(type: string): UnityComponent | null;
        setEnabled(v: boolean): void;
    }
    Index

    Properties

    name: string

    The name of the object.

    Methods

    • Gets the handle of the child object of this object, by specified name.

      This method ignores the objects with Item component and its children. Use ClusterScript or SubNode to control the object with Item component.

      Parameters

      • name: string

      Returns PlayerLocalObject | null

      The handle of the object with specified name, or null if not found

    • Gets the activeness of the object.

      Returns null if the value cannot be obtained.

      Returns boolean

    • Gets the total activeness of the object. Returns true if the object itself and all its parent objects are active.

      Returns null if the value cannot be obtained.

      Returns boolean

    • Gets the handle of the Unity component attached to this object by type name. The available type names are defined in UnityComponent.

      If the object has multiple components, returns first component.

      This method throws error if the object is a parent or child of Item. This is a restriction to avoid control conflicts with Item components and Scriptable Item.

      Parameters

      • type: string

      Returns UnityComponent | null

      The component specified by type name, or null if not found

    • Sets the object's activeness. When the object is inactive, the object and all its children will not be rendered.

      This method throws error if the object is a parent or child of Item. This is a restriction to avoid control conflicts with Item components and Scriptable Item.

      Parameters

      • v: boolean

        true to activate the object, false otherwise

      Returns void