Adding a Mesh Component
Adding a Mesh Component
In this tutorial, you add a mesh component to the doorway entity and reference a prebuilt .cgf
file. The .cgf
file provides the 3D mesh data that defines what the entity looks like.
To add a mesh component
In the Entity Inspector, click Add Component.
Under Rendering, select Mesh. Tip
To quickly find a component, enter its name into the Search bar.Under Mesh, next to Mesh asset, click the browse (…) button.
In the browser window, navigate to
StarterGame/Objects/GSG
. SelectGSG_Maze_Doorway.fbx
, and then click OK.This file is the 3D mesh that defines the appearance of the entity.
Your entity now appears as a doorway.
Press Ctrl+S to save your level.
Press Ctrl+G to play the game.
Observe that your character cannot interact with the doorway entity but instead can pass right through it. You will add collider and physics components in the next section so that your character can interact with the entity.