Pages

joi, 13 iulie 2023

Unity 3D : Prefabs in Unity 3D.

You can read documenatation on this official website.
In short, a prefab is a way to package data so that it can be more easily and drag-and-drop into the folder called Prefabs.
Since there is more than one prefab in the construction and dynamics of the game, two creation modes are defined: one original and another that allows us to make changes to the original.
Use the drag and drop operation twice with an object created in the Hierarchy area and you will get a dialog that will allow you to differentiate.
After choosing how you want to use it, the prefab can be used with drag and drop and assigned to the game environment in the Hierarchy panel.
If you want to change it, you will have to right-click and you will see a Prefab menu with submenus for allowed operations.
These are basically what you need to know about prefab.