Hey,
So i’m currently working on a project to learn Unreal Engine as someone currently studying in University with years of experience with Unity. It is a vertical slice of a racing game.
I had an idea for how to handle the races inspired by something that was done in the ps2 era games that inspired me, which is to create one large map and then spawn the races in as prefabs. The race prefabs will contain race start positions, checkpoints, race information (laps, time of day, weather) and even some prefabs like breakable props. My issue is, I don’t really know how to do that in Unreal.
I know how I would do this in Unity. In that I would create an empty game object in editor set to 0,0,0 (let’s call this “parent”) then fill that “parent” with checkpoints, start positions and props as children (organised into subfolders to make it easier to track). Then as a component of the “parent” I’d add a “Race” script which will contain all the adjustable values like laps, time of day, weather and etc as well as arrays for checkpoints and props. I’d then save “parent” as a prefab, then in the menu when I select the race and the scene switches from “Menu” to “main” the “main” map would initialize by spawning in my selected race prefab.
The key thing is that the race script is just a reusable base.
How would I translate that to Unreal? I’ve explored a little bit but the way unreal handles prefabs seems really different from Unity so I’m a little stumped. At the moment i’ve been creating “Checkpoint” prefabs as a starting point, and i’ve experimented a little with the “race” prefab that will act as the parent for the checkpoints, but i’ve quickly realised you cant just create prefabs within the hierarchy view in ue like you can in unity. Also, I am using C++ in combination with Blueprints. C++ answers are much appreciated.
If someone could point me in the right direction I’d really appreciate it! Sorry for the long winded post. I’m really just trying to learn my way around the editor by prodding at it to see how it works.