Preparing search index...

    An asset for 3D meshes.

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

    // Find FileMesh assets (imported 3D mesh files like FBX, OBJ)
    const fileMeshes = assetManager.assets.filter(a => a.isOfType('FileMesh'));

    if (fileMeshes.length > 0) {
    const mesh = fileMeshes[0] as Editor.Assets.FileMesh;

    // Create a scene object with a RenderMeshVisual and assign the mesh
    const obj = scene.createSceneObject('MeshObject');
    const visual = obj.addComponent('RenderMeshVisual') as Editor.Components.RenderMeshVisual;
    visual.mesh = mesh;

    console.log(`Assigned FileMesh "${mesh.name}" to RenderMeshVisual on "${obj.name}"`);
    } else {
    console.log('No FileMesh assets in project');
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cacheFile: Path

    Path to the cached asset file.

    Import metadata for the asset.

    id: Uuid

    The unique id of the entity.

    info: MeshInfo
    meta: Meta

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

    name: string

    The name of the asset.

    type: string

    The entity's type.

    Methods

    • Returns the name of this object's type.

      Returns string

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

      Parameters

      • type: string

      Returns boolean