prefabs in unity | explain in Sinhala

prefabs in unity | explain in Sinhala

Subscribers:
3,150
Published on ● Video Link: https://www.youtube.com/watch?v=nynMGYnp-QY



Duration: 20:20
181 views
13


Unity’s Prefab system allows you to create, configure, and store a GameObject
complete with all its components, property values, and child GameObjects as a reusable Asset. The Prefab Asset acts as a template from which you can create new Prefab instances in the Scene
.

When you want to reuse a GameObject configured in a particular way – like a non-player character (NPC), prop or piece of scenery – in multiple places in your Scene, or across multiple Scenes in your Project, you should convert it to a Prefab. This is better than simply copying and pasting the GameObject, because the Prefab system allows you to automatically keep all the copies in sync.

Any edits that you make to a Prefab Asset are automatically reflected in the instances of that Prefab, allowing you to easily make broad changes across your whole Project without having to repeatedly make the same edit to every copy of the Asset.

You can nest Prefabs inside other Prefabs to create complex hierarchies of objects that are easy to edit at multiple levels.

However, this does not mean all Prefab instances have to be identical. You can override settings on individual prefab instances if you want some instances of a Prefab to differ from others. You can also create variants of Prefabs which allow you to group a set of overrides together into a meaningful variation of a Prefab.

You should also use Prefabs when you want to instantiate GameObjects at runtime that did not exist in your Scene at the start - for example, to make powerups, special effects, projectiles, or NPCs appear at the right moments during gameplay.

Some common examples of Prefab use include:

Environmental Assets - for example a certain type of tree used multiple times around a level (as seen in the screenshot above).

Non-player characters (NPCs) - for example a certain type of robot may appear in your game multiple times, across multiple levels. They may differ (using overrides) in the speed they move, or the sound they make.

Projectiles - for example a pirate’s cannon might instantiate a cannonball Prefab each time it is fired.

The player’s main character - the player prefab might be placed at the starting point on each level (separate Scenes) of your game.




Other Videos By RedController Interactive


2021-09-25How to make a racing game in unity | Sinhala part 5 | checkpoints | using standard Asset
2021-09-21Augmented Reality Birthday Card | how to create a modern b' day card for your loved once | unity
2021-09-18Tatra Т813 new DLC vehicle ib snowrunner | gameplay
2021-09-17How to make a racing game in unity | Sinhala part 3 | make own environment | using standard Asset
2021-09-14How to make a racing game in unity | Sinhala part 4 | create AI cars | using standard Asset
2021-09-10Volkswagen Beetle offroad edition | The crew 2 gameplay
2021-09-09The crew 2 new season gameplay | US speed tour west | no commentry | 🔴live
2021-09-08How to make a racing game in unity | Sinhala part 2 | replace car and script main camera
2021-09-06How to make a racing game in unity | Sinhala part 1
2021-09-01Real Tuk racing | ලංකාවේ හදපු mobile ගේම් එක
2021-09-01prefabs in unity | explain in Sinhala
2021-08-26How to make Terrain | terrain tools and how to import export heightmaps | Sinhala tutorials part 2
2021-08-25How to make Terrain in unity | Sinhala tutorial part 1
2021-08-21ZiKZ 5368 in snowrunner | gameplay
2021-08-202nd Anniversary special | Risk of rain 2 anniversary update gameplay
2021-08-16Augmented reality rc van | android app using unity engine + vuforia | sinhala tutorial|
2021-08-13Lifeslide full gameplay walkthrough | Watch and relax the mind
2021-08-10The crew 2 elite bundle 8 | Bugatti car bundle
2021-08-09The crew 2 live gameplay🔴🔴
2021-08-08The Crew 2 Season 3 Episode 1 US Speed Tour East gameplay
2021-08-07Urban trial tricky | first twenty minutes gameplay



Tags:
unity
unity3d
asset
assets
beginner
easy
how
to
learn
tutorial
tutorials
tip
game
development
develop
games
programming
coding
basic
basics
c#
nested
prefabs
workflow
workflows
prefab
variant
variants
mode
prefab mode
nest
parent
unite
gdc
2018