Google News
logo
Unity - Interview Questions
What is Prefabs in Unity 3D?
In Unity 3D, Prefabs are pre-made objects or groups of objects that can be reused multiple times in a project. A Prefab can be created by selecting a group of objects in the scene, and then dragging and dropping them into the Project window.

* Once a Prefab is created, it can be added to a scene by dragging and dropping it from the Project window into the Hierarchy window.

* One of the main advantages of using Prefabs is that they can be edited and updated in one central location, and those changes will be reflected in all instances of the Prefab throughout the project. This makes it easy to make changes to frequently used objects, without having to update each instance manually.

* Prefabs can also be used to create complex game objects that are made up of multiple parts. For example, a character model might consist of a body, head, and limbs, all of which can be grouped together as a Prefab. This makes it easy to create multiple characters with the same basic structure, while allowing for customization of individual parts as needed.
Advertisement