Preparing search index...

    A node in the scene hierarchy, holding components and child scene objects.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;
    const rootObjects = scene.rootSceneObjects;

    console.log(`Root scene objects: ${rootObjects.length}`);

    for (const obj of rootObjects) {
    console.log(`Object: "${obj.name}", enabled: ${obj.enabled}`);
    console.log(` Children: ${obj.getChildrenCount()}`);
    console.log(` Components: ${obj.getComponentsCount()}`);
    console.log(` Has visuals: ${obj.hasVisuals}`);

    const transform = obj.localTransform;
    console.log(` Local position: ${transform.position}`);
    console.log(` Local rotation: ${transform.rotation}`);
    console.log(` Local scale: ${transform.scale}`);

    const children = obj.children;
    for (const child of children) {
    console.log(` Child: "${child.name}"`);
    }

    const components = obj.components;
    for (const comp of components) {
    console.log(` Component type: ${comp.type}`);
    }
    }

    if (rootObjects.length === 0) {
    console.log('No root scene objects found in the scene.');
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    children: SceneObject[]

    A list of scene objects that is a child of this scene object.

    components: Component[]

    A list of components that is a child of this scene object.

    enabled: boolean

    Whether this scene object is enabled or disabled.

    hasVisuals: boolean

    Whether this scene object contains any component which is of type Editor.Components.Visual.

    id: Uuid

    The unique id of the entity.

    layers: LayerSet

    The layerSet this scene object is on.

    localTransform: TransformEntity

    The transform of this scene object relative to its parent.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    The name of the scene object.

    topOwner: ObjectOwner

    The root owner object at the top of this object's ownership chain.

    type: string

    The entity's type.

    worldTransform: WorldTransformAccessor

    The transform of this scene object relative to the scene its in.

    Methods

    • Add a scene object as a child of this object at a specified pos.

      Parameters

      Returns void

    • Add the component value at the specified pos.

      Parameters

      Returns void

    • Remove all children from this object.

      Returns void

    • Remove all components from this scene object.

      Returns void

    • Returns a deep copy of this scene object, including its children and components.

      Returns SceneObject

    • Destroy this scene object. All references to it becomes invalid.

      Returns void

    • Get a specific object at the specified pos.

      Parameters

      • pos: number

      Returns SceneObject

    • Get the number of children on this object.

      Returns number

    • Get the component at the specified pos.

      Parameters

      • pos: number

      Returns Component

    • Get the number of components on this object.

      Returns number

    • Returns the name of this object's type.

      Returns string

    • Get the position of a specific object, if the object is a child of this object.

      Parameters

      Returns number

    • Get the position of a specific component value on this object.

      Parameters

      Returns number

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Move child in the order of children on this object.

      Parameters

      Returns void

    • Move the component value to a specified pos.

      Parameters

      • origin: number
      • destination: number

      Returns void

    • Remove a child from this from this scene object.

      Parameters

      Returns void

    • Remove a child at the specified pos.

      Parameters

      • pos: number

      Returns void

    • Remove the first component of componentType from this object.

      Parameters

      • componentType: string

      Returns boolean

    • Remove the components at the specified pos.

      Parameters

      • pos: number

      Returns void

    • Set the child scene object value to be at the specified pos.

      Parameters

      Returns void

    • Set the component value to be at the specified pos.

      Parameters

      Returns void

    • Set the parent of this scene object.

      Parameters

      Returns void

    • Returns the static metadata descriptor for the SceneObject type.

      Returns Meta