October 2016
Intermediate to advanced
452 pages
9h 47m
English
In the last recipe, we created a Static Mesh Component, but we didn't try to load a mesh for the Component to display. While it's possible to do this in the Editor, sometimes it is helpful to specify a default in C++.
Follow the previous recipe so you have a custom Actor subclass with a Static Mesh Component ready.
In your Content Browser, click on the View Options button, and select Show Engine Content:

Browse to Engine Content, then BasicShapes to see the Cube we will be using in this recipe.
auto MeshAsset = ConstructorHelpers::FObjectFinder<UStaticMesh>(TEXT("StaticMesh'/Engine/BasicShapes/Cube.Cube'")); ...Read now
Unlock full access