Prefabs - Reading Assignment

  1. Is a game object which acts as a template that can create new instances in a scene.

  2. To save time and it is easy to be used.

  3. NPCs, players character.

1 Like

1. What is a prefab?

A prefab is a template which enables one to re-use game objects with specific changes applied without having to re-apply the same changes made from a previous object for a new one.

2. Why should we use a prefab instead of copying the GameObjects?

To save time having to modify any same object to be like a previously defined game object.

3. Give some examples of situations in which a prefab might be necessary.

  • Environmental Assets (e.g. trees used multiple times around a level)
  • NPCs (e.g. multiple prefabs of the same NPC that appears multiple times in the game but may have overridden values such as movement, sound, colour etc…)
  • Projectiles (e.g. a gun instantiating a bullet Prefab, each time it is fired)
1 Like

1. What is a prefab?
an object that is saved with all it’s properties to be used again, and are controlled and edited in one place for all copies.

2. Why should we use a prefab instead of copying the GameObjects?
to streamline the complex projects that may have many of the same objects

3. Give some examples of situations in which a prefab might be necessary.
projectiles, trees, houses, enemy monsters

1 Like

Prefabs -Reading

  1. A Prefab is a template that allows you to create, configure and store Game Objects complete with all its components values and child Game Objects as a reusable Assets.

  2. We use Prefab instead of copying the Game Object because, the Prefab allows us to to automatically keep all the copies in sync.

  3. Examples of situation of which a Prefab might be necessary are:

  • Editing - making broad changes across the whole projects without having to repeatedly make the same edit to every copy of the Asset.
  • Nest prefab - inside other prefab to create complex hierarchies of objects that are easy to edit at multiple levels.
  • Environmental Asset - when you want to use certain type of trees multiple times around a level.
  • Non-player characters(NPCs) - if you want a robot to appear in your game multiple times, across multiple levels.
  • projectiles - if you want a Pirate’s cannon instantiate a cannonball Prefab each time is fired.
  • The Player’s character - if you want a player Prefab placed at the starting point on each level (Separated Scenes) of your game.
  • Override - if you want some instances of a Prefab to differ from other variants - allows you to group a set of overrides together into meaningful variants of a Prefab
  • Instantiate Game Object at a runtime - if you want powerups, special effects, projectiles etc.
1 Like
  1. Prefab is a solution for storing a game objects with all its characteristics as a sort of template. Hence, if you want to use an object many (or at least multiple) times, it makes sense not to copy-paste an object but saving it as a prefab.

  2. Changes on an object that is stored as prefab have only to be made once and not the n times you are using the object in the game. So, saving time and reducing complexity might be the two main reasons for creating prefabs.

  3. a prefab could be very useful in order to place thousands of our coins in the game. Or for creating npcs such as enemy figures in a jump&run game, health potions and any element being reused in the game.

1 Like

1.sounds like a copy of placed assets that we can use when we want plus we can adjust them.
2.dont have to redo the whole thing so it saves us time.
3.npc’s or i.e. trees in sceneries

1 Like

1. What is a prefab?
A collection of GameObjects

2. Why should we use a prefab instead of copying the GameObjects?
prefabs are nicely grouped together, they may have individual components but they work seamlessly as a one unit.

3. Give some examples of situations in which a prefab might be necessary.
A game character may be made up of lots of models - say the arms are separate from the body model so they can be animated separately but as prefabs they all work together to make one unit - the game character. This single prefab can then be spawned in as desired as a single unit.

1 Like

1. What is a prefab?
It’s a template for creating/configuring/storing a new instance of GameObject

2. Why should we use a prefab instead of copying the GameObjects?
Because when you change the configuration of prefab it will be done automatically for all of them.

3. Give some examples of situations in which a prefab might be necessary.
To create recurring elements such as coin.

1 Like

1 A prefab is a game object that has all the components values and information of the object, that can be used like a template to replicate the same item many times in the game.

2 Using a prefab saves time with copy and paste and is a more efficient way of populating the environment because all the items are in sync.

3 Trees or Laser blasts.

1 Like
  1. A prefab - or prefabricated object - is “a GameObject complete with all its components, property values” that can be used “as a reusable Asset”.

  2. We should use prefabs instead of just copy/paste GameObjects “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”

  3. You might want to use a prefab when:

  • You want an NPC in multiple locations
  • Multiple trees making up a forest landscape
  • Multiple enemies, each with distinguishing features from each other
1 Like
  1. A prefab is a set of game objects that share similar attributes and you can change all in one step.

  2. More effectiv and secure.

  3. Coins, trees, everything which appears often in the scenery.

1 Like

A reusable asset created from different components.

Because prefabs can be altered effecting all instances at once.

Coins, Trees, pretty much any kind of object that isn’t unique

1 Like

1. What is a prefab?
Allow to create, configure and save game objects with all components
2. Why should we use a prefab instead of copying the GameObjects?
for the sync, for example some change in an armor on a npc is reflected in all soldiers.
3. Give some examples of situations in which a prefab might be necessary.
NPCs, parts of the ambiance(threes, rocks, etc), put the principal character in every level on a specific position.

1 Like

Prefabs - Reading Assignment

  1. Prefab is unity’s system that allows developers to create, configure, and store GameObjects, etc as reusable assets. They are templates from which a developer can use to create new prefab instances for use in scenes.

  2. We should use the Prefab system over copying GameObjects because the Prefab system will automatically keep all copies in sync.

  3. A good situation to implement prefabs is to generate items like the main player, powerUps and NPCs, at GameObject runtime.

1 Like
  1. a Prefab is like a group model (think programming class object) or object that groups things together to use as a bigger component in a game.

  2. Because a prefab is reusable. Change it in one spot and all the child instances change with it.

  3. Environment assets, NPC, projectiles.

1 Like

1. What is a prefab?
The Prefab Asset acts as a template from which you can create new Prefab instances in the Scene
2. Why should we use a prefab instead of copying the GameObjects?
Using Prefab Assets makes re-using certain reoccurring GameObjects easier, also grouping and modifying them to fulfill a specific purpose.
3. Give some examples of situations in which a prefab might be necessary.

  • Environmental Assets - for example a certain type of tree used multiple times around a level
1 Like
  1. What is a prefab?
  • Reusable asset that acts as a template from which you can create instances in a game scene.
  1. Why should we use a prefab instead of copying the GameObjects?
  • Any modifications done to a prefab will be reflected on each instance of that prefab, you don’t need to go through each asset to make the same edit repeatedly
  1. Give some examples of situations in which a prefab might be necessary.
  • You have a forest in a game comprising the same looking tree
  • An enemy goblin that spawn many times in different points in your game
1 Like
  1. Prefabs are templates which can be used to create gameobjects complete with components, properties, …
  2. If you change a prefab, all objects created from that prefab will reflect that change. Changing a gameobject will not change it’s copies.
  3. In the game we’re making we can make a prefab of a coin with the animation, scripts, tags, whatever it is attatched to it and then create as many duplicates as we need. We can spawn them, or just manually set them in levels. If we use prefabs we’re going to save a lot of work if we ever want to change the coin’s properties.
1 Like
  1. A group of configured assets that can be shared across scenes.
  2. Editing is more efficient with syncing.
  3. Coins, platforms, NPCs.
1 Like
  1. What is a prefab?

It’s like an object template that contains al components, property values, and child GameObjects.

  1. Why should we use a prefab instead of copying the GameObjects?

It gives you one place to control the all the copies of the Prefab so that you don’t have to edit all the instances. This saves a lot of time and makes it easier to manage.

  1. Give some examples of situations in which a prefab might be necessary.

Environmental Assets, NPCs, Projectiles, Player’s main character

1 Like