In this lesson, we are going through two ways of placing props on your map efficiently. This Object Generator is useful when you want to place lots of assets in your scene without using a Terrain or when you need foliage at a specific place. It is also useful if you want the player to interact with those objects as they are all Core Objects. For example, you can spawn templates with scripts.
To place objects in your scene, you can select an object in the Core Content or Project Content and press the key X while moving your cursor in your scene. A new instance of this object is placed at the position your cursor is pointing at.
For more control on the object that is spawned, you can open the Window > Object Generator and tune the parameters. Press Shift + X to apply those parameters. You can randomize the scale, the yaw (which is the rotation on the Z-axis), and even the color of the Base Material (red, green and blue values between 0 and 1). You can also use Spawn Upright or Only Spawn On Terrain for specific use-cases like trees.
Core comes with a tool that allows you to place lots of objects in a zone with random parameters.
To use this button, place any asset on your map (triggers or any cubes are recommended). After scaling this asset above the zone you want to cover, select it in your Hierarchy and select an asset in your Content. Everything is now set up, you can then press the Spawn Selected Asset Under Selected Hierarchy Object button. You can also use Spawn Upright or Only Spawn On Terrain for specific use-cases.
The 4 parameters under the button give you more control over the spawned assets: