Component reference
Files components

Model component

6min

Description

The Model component loads 3D models into your scene. It accepts glTF or GLB files, which can be directly imported into the scene. This is the primary way to bring 3D content into your scenes. Models can also reference prefabs, which are themselves glTFfiles, allowing for complex and reusable content structures.

Document image

Document image



Properties

Property

Description

Model Url

The file path or URL to the 3D model (glTF or GLB file). You can drag and drop assets directly onto the URL field to load them into the entity.

Occlude camera

Determines whether the model should be culled when not in view. When enabled, the model doesn't get rendered when it's out of the camera's view, improving performance. It is recommended to leave this on unless working with instanced geometry.

Export settings

Options for exporting changes made to the model in the scene back to a glTF or GLB file. This includes fields for selecting the Project, specifying the File Path, and choosing the File Extension (glTF or GLB). This functionality allows you to save modifications or create prefabs from the model, including nested objects.

Usage notes

  • Saving changes: After modifying a model in the scene, you can save your changes back to the original file using the Save button in the hierarchy panel. This overwrites the existing model file with your modifications.
Save changes button in the hierarchy
Save changes button in the hierarchy

  • Creating prefabs: Right-click on an entity and select the Create prefab option to create a new prefab file from the current model and its modifications. Prefabs reference the original model file and include any changes you've made.

⚠️ References vs. copies

Be aware that creating prefabs creates a reference to the original model. If you modify the original model file, those changes will propagate to all prefabs referencing it. To create independent copies, use the Export settings to save the model under a new name.

Important details

  • Instanced geometry: If working with instanced geometry, you may need to enable the Occlude camera setting to ensure that instances are rendered correctly, even when the base model is out of view.
  • File overwriting: When saving changes, the system is designed to overwrite the existing model file. Be cautious, as this may overwrite your original files.
  • Upcoming changes: After the engine's release of v1.0, the Export settings may be removed or modified in future updates, emphasizing the improvement of the prefab system and saving workflows.