I am trying to follow the quick start guide here: Unreal Engine CPP Quick Start | Unreal Engine 5.0 Documentation. I copied the code from the guide directly without changes, and when I run it I get the following error message:
Default Property warnings and errors:
Error: CDO Constructor (FloatingActor): Failed to find /Game/StarterContent/Shapes/Shape_Cube.Shape_Cube
I can still place the FloatingActor in the perspective viewport, but it isn’t actually visible. I can fix this by adding a Static_Cube from the content browser in the unreal editor. However, I cannot figure out how to make the cube visible using the code from the quick start guide, which is exceedingly frustrating. Any guidance on what is causing the error and how I can fix it would be very much appreciated.
Hey wmorriss! I’m from the Unreal Engine Documentation team and I think I can help. While I’m unfamiliar with that error, I can reach out to the rest of the Docs team to see what’s going on. I’ve created a ticket and I’ll update this thread once I have more information.
Very likely an issue with the Shape_Cube Asset having been renamed to Static_Cube. I’ll look into fixing the tutorial with the correct asset name. Of course, the ideal best practice is not to hardcode asset paths, but in the interest of making the fastest possible intro tutorial - and because it is actually possible to do, even if not the most highly recommended way - we went with that approach. One way users can do it from code would be to find that Static_Cube Asset, or any other Static Mesh, and right-clicking it in the Content Browser. From there, pick the “Copy Reference” option in the context menu, and then paste the string you get from that as the Asset path in code.
I made it work by replacing /Game/StarterContent/Shapes/Shape_Cube.Shape_Cube with /Engine/BasicShapes/Cube.
I found the new path by dragging a cube from the Place Actors panel into the Viewport, right-clicking the cube, and selecting the option “Reference Viewer…”. This brought up a browser-like window where the URL represented the path.
Wow, one year passed and this typo is still in docs. Actually FObjectFinder will find this one from starter pack: /Game/StarterContent/Shapes/Shape_Cube without “Shape_Cube.Shape_Cube”.
Actually this mistake in QuickStart may start you to learn CryEngine or Unity. Just because you have to guess which path is right.
Please fix two typos: “Shape_Cube.Shape_Cube” and “**AFloatingActor::Tick(float DeltaTime)” here: Programming Quick Start | Unreal Engine Documentation
We see that this is your first time posting to the community!
Thank you for dropping the info about the typo and helping to keep our community great! You are appreciated! I will ensure that someone from the staff sees this. @Amanda.Schade