Creating Prefabs to store in external libraries
In this recipe, we will show you how to create a Prefab and look at some of the global uses for them.
Getting ready
Before we begin, you must have Sandbox 3 open
Then open
My_Level.cry
Create the house object again from the Editing and Merging Solids recipe
Then place down the Objects/natural/trees/hill_tree/hill_tree_large_bright_green.cgf as a brush near the house
How to do it...
The house and the tree are just two objects that will be used to demonstrate creating a Prefab.
Before we begin, we must create a new library to store these objects:
Open the DataBase View (View | Open View Pane | DataBase View).
Open the Prefabs Library tab.
Create a new Prefab library named My_Prefabs.
Select both the House and the Tree.
In the main toolbar, click on Prefabs | Make from Selection.
Group =
Houses
.Name =
House_with_tree
.Click on the Save Modified Libraries in the DataBase View.
Note
If you do not perform step 8 and close the level, you risk losing your Prefab...