Prefabrication is cloning
For example, to simulate a rainy scene, the world fell off a one-raindrop. If we were to create an object for each raindrop at this point, it would be a waste of resources, and it would not be necessary, because all the raindrops were the same. This is the time to use a prefab, a type of game object resource that can be reused. |
Add a prefab (Prefab)
First step: Add the Game object to be cloned
Step Two: Add "Assets-create-prefab"
Step three: Pull Cube1 down muti.
|
Features of Prefab
The first step: add Muti to the hierarchy
When you click Muti, you can see that the game object has one more attribute in Inspector
Select: Prefab found in assets Revert: Reset, cancel just the operation Apply: Application, just-in-action application Step two: Copy several muti "Select Muti directly, then CTRL c/v, then move their position down"
Step Three: Change the length of any one muti, then click Apply
It is found that changes in the properties of Prefab's game objects can affect the properties of other game objects copied through the Prefab object. |
Unity Learning-Prefabrication (iv)