User Manual

Import Hierarchy

PlayCanvas supports importing models with their meshes as a hierarchy of entities in the scene. This allows you to edit the different meshes directly in the Editor. Components can be added, attach other entities, move/rotate/scale entities in the hierarchy etc.

Edit model hierarchy in the Editor

How to enable

This is now enabled by default for new projects.

Open the 'Project Settings'

Scroll down to 'Asset Tasks' and enable 'Import Hierarchy':

Importing models

A full tutorial on importing your first model and animation can be found here.

As an overview, when you drag the model file into the 'Assets Panel':

Drag Model into Assets Panel

The following assets will be created when imported:

Created Assets

Asset Type Description
Materials Materials used by the imported model, mapped to the mesh instance.
Textures Embedded textures in the model file (if any). These will automatically be mapped to the associated materials.
Template The template stores the scene hierarchy of the model. Create an instance of the template to bring the model into the scene.
Container The GLB that stores all the meshes of the model.
Render Render assets reference a mesh in the container asset and are used by the Render Component to render the mesh in the scene. They can also be used with the Collision Component as a mesh for physics.

Updating models

As the hierarchy is created as part of a template, when a model is updated it may affect the template instances in the scenes.

Added components to entities in the template will be kept during the update unless the mesh instance that the entity represents no longer exists in the updated model.

The exception to this is if a script component is added to an entity in the template and the mesh instance it represents is no longer part of the updated model, it will be moved under the root entity in the template so there is no data loss. Any entities that were under it before the update will be kept as well.

How the Editor decides what is a new or removed mesh instance is done by the following: