The entity which will be coverted into the Lens scene during project export. This scene will contan and own all objects and components in the Lens. This entity can be accessed via the current project’s model.project.scene.

interface Scene {
    fileMeta: AssetImportMetadata;
    id: Uuid;
    layers: Layers;
    mainCamera: Editor.Components.Camera;
    name: string;
    renderOutput: RenderTarget;
    renderOverlayOutput: RenderTarget;
    renderPreviewOutput: RenderTarget;
    rootSceneObjects: Editor.Model.SceneObject[];
    sceneObjects: Editor.Model.SceneObject[];
    type: string;
    addSceneObject(parent: Editor.Model.SceneObject): Editor.Model.SceneObject;
    createSceneObject(name: string): Editor.Model.SceneObject;
    findComponents(entityType: string): Editor.Components.Component[];
    getDirectlyReferencedEntities(): Entity[];
    getOwnedEntities(): Entity[];
    getRootObjectIndex(object: Editor.Model.SceneObject): number;
    getTypeName(): string;
    instantiatePrefab(prefab: Editor.Assets.ObjectPrefab, parent: Editor.Model.SceneObject): Editor.Model.SceneObject;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    remapReferences(referenceMapping: object): void;
    reparentSceneObject(object: Editor.Model.SceneObject, newParent: Editor.Model.SceneObject, position?: number): void;
}

Hierarchy (view full)

Properties

id: Uuid

The unique id of the entity.

layers: Layers

This list of layers that exists within this scene.

The camera that renders renderOutput.

name: string

The name of the asset.

renderOutput: RenderTarget

The Editor.Assets.RenderTarget which this scene will be rendered to. See "Lens Scripting".Built-In.ScriptScene.

renderOverlayOutput: RenderTarget

The overlay Editor.Assets.RenderTarget which this scene will be rendered to. This will shown at full resolution to the device which opens the Lens.

renderPreviewOutput: RenderTarget

The preview Editor.Assets.RenderTarget which this scene will be rendered to. See "Lens Scripting".Built-In.ScriptScene.

rootSceneObjects: Editor.Model.SceneObject[]

A list of scene objects which is a direct child of this entity.

sceneObjects: Editor.Model.SceneObject[]

A list of scene objects which is a child of this entity.

type: string

The entity's type.

Methods

  • Beta

    Parameters

    • type: string

    Returns boolean

  • Beta

    Swap this entity for another one based on a JSON of the current entity id and the target entity id.

    Parameters

    • referenceMapping: object

    Returns void