LogoLogo
HomeDiscordVideo TutorialsBuilder Opportunities
  • Welcome to MONA
    • What is a Space?
    • Unity Overview
  • ⬛Create
    • Getting Started Building
    • MONA Crash Course
      • Setting up MONA in Unity
      • Introduction to Unity
      • Setting up Simple Assets
      • Metaverse / WebGL Limitations
      • Creating 3D Assets
      • Applying Materials & Unwrapping UVs
      • Importing Assets into Unity
      • Adding Colliders
      • Adding Lighting
      • Adding a Custom Skybox
      • Setting up Canvases
      • Uploading to your Wallet
    • Building Spaces
      • Space Limitations
      • Create your Space
        • Space Overview
        • Colliders
        • Materials
        • Portals
        • Canvases
        • Artifacts
        • Add a Custom Skybox
        • Test Your Space
        • Troubleshooting
      • Improve your Space
        • Lightmaps (Unity Lightmapper)
        • Light Probes
        • Reflection Probes
        • Animation in Unity
        • Importing Animation
        • Player Property Volumes (PPV's)
        • Warp Volumes
        • Adding Audio
        • VRM Switcher
        • Custom Canvases
        • Embedded Video
        • User Interface (UI)
        • Creating Custom Shaders
        • Imported Assets
        • Lightmaps (Bakery Asset)
      • Optimise your Space
        • Prefabs
        • 3D Asset Specs
        • Optimizing your Space
      • Adding Interactivity
        • Visual Scripting
          • Web Request Node
        • Mona Reactor
          • Creating Animation
          • Using Animator
          • The Reactor Component
          • Reactor Overview
      • MONA Tools
        • Template Utility
        • MONA Capture
        • Light Probe Generator
        • VOX Importer
      • Submit Your Space
        • Submitting your Space
        • Creating an Image & Video Preview
        • QA Process
        • Mint Your Space
      • Update your Space
      • Frequently Asked Questions
      • Troubleshooting
    • Creating Assets
      • Asset Requirements
      • 3D Asset Types
      • Asset Creation Approaches
      • Optimizing your Mesh
      • GLB Considerations
      • Example - Cyberpunk Car
    • Creating Avatars
      • Getting Started with VRM
      • VRM Requirements
      • VRM Creation
        • Using Mixamo for Rigging
        • Adding Custom Bones to the Rig (Optional)
      • Creating your Avatar using UniVRM
        • Importing UniVRM into Unity
        • Creating the VRM using UniVRM
        • Adding Spring Bones in UniVRM (Optional)
      • Creating your Avatar using 'VRM for Blender'
        • Adding 'VRM for Blender' into Blender
        • Using 'VRM for Blender' for Rigging
        • Adding a Material
        • Assigning VRM Details
        • Exporting the Avatar
      • Uploading your VRM
      • Using Avatars in WebAR
      • Submitting your VRM to the Mona Marketplace
      • Mint Your Avatar
      • Troubleshooting
    • Resources
      • MONA Claim Asset Requirements
      • Unity Wallet SDK (Alpha)
      • MONA Playground
      • MONA Tutorials
        • Retrowave Modules
      • Asset Resources
        • 3rd Party Assets
        • Textures
        • Shaders
        • 3D Assets
        • Audio
        • Tools
        • Tutorials
      • MONA Library
        • MONA Library Submission
      • Useful Unity Packages
      • Updating the Template SDK
      • Importing Mozilla Hubs Spaces to MONA
      • Importing AltspaceVR spaces to MONA
    • MONA Marketplace
  • ⬛Explore
    • How to Use MONA
    • Using VRM Avatars
    • Audio Settings
    • Explorer's Frequently Asked Questions
  • ⬛Collect
    • Setting up a wallet
      • Delegating a Wallet
    • Own a Space
      • Host an Event
      • Uploading your Images
      • Add Images to a Canvas
      • Live Music Feed
      • Token Gated Access
      • Minted 3rd Party Assets
    • MONA Create
      • Create FAQ
    • Live Streaming in MONA
      • Setting up OBS Studio
      • Livestream using OBS Studio
      • Livestream using a Mobile Device
      • How to Stream Using Twitch or YouTube
      • Add a Livestream to a Canvas
    • Collector's Frequently Asked Questions
  • General Resources
    • Web3 Introduction
    • How to sell Art in Web3
    • Game Dev Glossary
    • Buildathons / Challenges
      • 3D Asset Buildathon (Current)
        • Frequently Asked Questions
      • Emote/Emoji Challenge (Completed)
      • Stream Challenge (Completed)
      • Custom Avatars (Completed)
      • Build : NY Challenge (Completed)
      • Sculpture Challenge (Completed)
      • Portal Hub (Completed)
      • Interact (Completed)
      • The Renaissance (Completed)
Powered by GitBook
On this page
  • Setting up a Prefab
  • Updating your Prefab
  • Method 1
  • Method 2
  • Method 3
  • Method 4
  • Method 5
  • Returning to your Space
  • Removing an Asset from the Prefab
  • Unique Prefabs

Was this helpful?

  1. Create
  2. Building Spaces
  3. Optimise your Space

Prefabs

PreviousOptimise your SpaceNext3D Asset Specs

Last updated 2 years ago

Was this helpful?

Prefabs are a tool that helps with management and optimization of a space by creating assets that work much like a template object. When you update the Prefab, all assets in your space will be updated as well.

If you plan on using the one asset in multiple places in your environment, then it is recommended to use Prefabs to do so.

This improves performance as well as prefabs placed in a space act like instances of the asset, which allows Unity to render them to the space with less resources than if you placed the same model in the space manually.

Setting up a Prefab

Setting up a prefab is as easy as dragging the asset from the Hierarchy to the Project folder. It's recommended to have a folder in your Project labelled Prefabs, and then drag your assets into that.

Updating your Prefab

There are several ways to update a prefab, and therefore all the assets in the space that use that prefab. Which one you choose completely depends on your process, but will basically come down to two results, editing in Context and editing in Isolation.

In Context will open the prefab in the space, so you can see the space around the asset if that is important or useful to visualise next to the asset.

In Isolation will open the prefab in it's own space, so you know exactly what is included in the Prefab itself.

Method 1

Right mouse click the prefab asset in the Hierarchy, and use either :

  • Prefab > Open Asset in Context

  • Prefab > Open Asset in Isolation

This will open the asset itself allowing you to edit it as you see fit. Once you return to the main space (at the top left) all instances of the Prefab will also be updated.

Method 2

Click on the arrow to the right of the asset in the Hierarchy to open the asset in context. If you hold the Alt key it will open in Isolation.

Method 3

It is possible to update the Prefab after you have edited the asset in the space using the Overrides pulldown at the top right of the Inspector on the prefab itself with the blue box (not the asset you have edited if it is a child of the prefab).

It is also possible to revert back to the original prefab if you do not like the changes you have applied.

Method 4

Double click the Prefab in the Project to open it in Isolation.

Method 5

Use the Open button on the prefab at the top of the inspector. It is also possible to select the Prefab asset in the Project with the Select button next to it if required.

Returning to your Space

After you have edited your Prefab, you can usually return to the Space itself by using the Top Left of the Space window.

Removing an Asset from the Prefab

Occasionally you may want to remove an asset from the Prefab itself. You do this by Right clicking on the gameobject in question and use :

  • Prefab > Unpack

  • Prefab > Unpack Completely

Unpack Completely will remove all prefabs within the asset, whereas Unpack will remove the links to the prefab on the gameobject in question.

This is useful on assets that produce a warning about editing Prefabs or Nested prefabs, and removes the warning. However note that the asset is no longer a prefab, and will not benefit from their advantages unless you make it a prefab again and use it as the Template.

Unique Prefabs

It is possible to make variations on Prefabs without updating the prefab itself. These are done using what are called Overrides, and can be applied to the following elements of a Prefab.

  • Overriding the value of a property

  • Adding a component

  • Removing a component

  • Adding a child GameObject

To do this all you have to do is modify the asset directly and then make sure you do NOT update the prefab itself. Any overrides to the prefab will be visible in bold, and the Prefab icon (the blue box) may have a Plus on it notifying you that the asset has been modified.

An overridden property will always have priority over updates you make to the original prefab.

⬛
Creating a Prefab
Editing the prefab with Right Click
Editing the prefab using the Arrow
Editing a Prefab using Overrides
Editing a Prefab by Double Clicking
Editing a prefab using the Open Button
Return to editing your space