realvirtual.io
  • Building Digital Twins with Unity and realvirtual.io
  • Basics
    • Installation
    • Demo Model
      • Old Demo Model
    • Editor User Interface
      • Hierarchy Window
      • 3D Views
      • Quick Edit
      • Move Pivot Points (Pro)
      • Selection Window (Pro)
      • Material Window (Pro)
      • Measurement (Pro)
      • Kinematic Tool (Pro)
      • Model Checker
    • Runtime UI
      • Group Manager
      • Debug Console
      • Responsiveness
      • Runtime Persistence
    • Importing and exporting
    • Folder structure
    • Tutorial
    • Physics
    • CAD import (Pro)
      • CADLink (Pro)
      • CAD Checker (Pro)
      • CAD Updater (Pro)
    • Reusable Components (Prefabs)
    • Cadenas parts4cad
    • Publishing the Digital Twin
    • Revision management
  • News
  • Login & Download Updates (Pro)
  • Components & Scripts
    • Realvirtual
      • Environment Controller
    • MU, Source and Sink
      • Source
      • Sink
    • Motion and Kinematic
      • Drive
      • Kinematic
      • Group
      • Joint
      • CAM
      • TransportSurface
      • Guided Transport
      • KinematicMU (Pro)
      • Drive behavior
      • Chain
      • Chain element
      • Motion for developers
    • Sensors
      • Sensor
      • Measure
      • MeasureRaycast
    • Picking and Placing MUs
      • Grip
      • Gripper
      • Fixer
      • Pattern
    • Changing MUs
      • MaterialChanger
      • PartChanger
      • Cutter
    • Scene Interaction
      • Tooltip (Pro)
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables (Pro)
      • Lamp
      • Interact3D
      • UI components
      • HMI components (Pro)
        • Start your own HMI
        • HMI Tab
        • HMI DropDown
        • HMI Puschbutton
        • HMI Switch
        • HMI Value
        • HMI Text
        • HMI Slider
        • HMI Message
        • HMI Marker
      • ModelZoo (Pro)
    • Interfaces
      • Interface Tools
        • Signal Manager
        • Signal Importer Exporter
        • Signal Catcher
        • OnValueChangedReconnect
      • Signal Importer / Exporter
      • ABB RobotStudio (Pro)
      • Denso Robotics (Pro)
      • EthernetIP (Pro)
      • Fanuc (Pro)
      • FMI
      • Igus Rebel
      • MQTT (Pro)
      • Modbus (Pro)
      • OPCUA (Pro)
      • PLCSIM Advanced (Pro)
      • RoboDK (Pro)
      • RFSuite (Pro)
      • SEW SimInterface (Pro)
      • Siemens Simit Interface (Pro)
      • Simit Shared Memory (Pro)
      • Simulink (Pro)
      • S7 TCP
      • TwinCAT (Pro)
      • TwinCAT HMI (Pro)
      • UDP (Pro)
      • Universal Robots (Pro)
      • Wandelbots Nova (Pro)
      • Websocket (Pro)
      • Windmod Y200 (Pro)
      • Custom Interfaces
    • Performance Tools
      • Combine Meshes (Pro)
      • Create Prefab (Pro)
      • Hierarchy Cleanup (Pro)
      • Mesh Optimizer (Pro)
      • Performance Optimizer (Pro)
    • Defining Logic
      • Unity Scripting
      • Behavior Graph
      • Logicsteps
      • Unity Visual Scripting
      • Recorder
    • Robot Inverse Kinematics (Pro)
    • Volume Tracking (Pro)
  • Multiplayer (Pro)
  • Extensions
    • ModelZoo
      • Beckhoff TwinCAT
      • Siemens S7
      • Denso Cobotta 1300
      • Wandelbots Nova Fanuc CRX
      • Universal Robots UR10
      • Fanuc Roboguide
    • realvirtual.io AIBuilder
      • realvirtual.io AI Builder Overview
      • Generate AI Training Data
      • AI Training
      • Testing AI in a Digital Twin
      • Deploying the AI
    • realvirtual.io Simulation
      • Conveyor Library
      • Path System
        • Path finding
        • Line
        • Curve
        • Workstation
        • Catcher
        • Pathmover
    • realvirtual.io Industrial Metaverse
      • Setup Guide
      • VR Modules
      • AR Modules
      • Multiuser
    • AGX Physics
    • VR Builder
    • CMC ViewR
  • Advanced Topics
    • Render Pipelines
    • Mixed Reality with Meta Quest3
    • Upgrade Guide
      • Upgrade to 2022
    • Open Digital Twin Interface
    • Usefull Addons
    • Improving Performance
    • Supported Platforms
    • Compiler Defines
    • For Developers
      • Important Classes and Interfaces
      • Assembly Definitions
      • Starting your development
      • Class documentation
      • realvirtual Init Sequence
      • realvirtualBehavior Lifetime Methods
      • Testing
    • Newtonsoft JSON
    • Troubleshooting
  • Release Notes
  • AI Digital Twin Assistant (GPT4)
  • License Conditions
Powered by GitBook
On this page
  • Introduction
  • Overview
  • Scene Mesh Handling
  • When to Use
  • How to Use
Edit on GitHub
  1. Components & Scripts
  2. Performance Tools

Create Prefab (Pro)

Introduction

While Unity provides a standard prefab workflow, realvirtual goes a step further with its own Create Prefab function. This tool is designed specifically for industrial simulation workflows, allowing you to generate self-contained, reusable assets that include not only meshes and hierarchy but also the logic components that define behavior—such as drives, signals, sensors, and automation interfaces.

💡 Hint: You should typically use this function after preparing and optimizing your GameObject—for example, after using Combine Meshes—to turn it into a lightweight, modular component.

Overview

The Create Prefab function in realvirtual creates a prefab asset that includes:

  • The complete GameObject hierarchy

  • All associated meshes (combined or separate)

  • All attached realvirtual components, such as:

    • Drives

    • Signals

    • Sensors

    • Kinematic groups

    • Custom logic or automation interfaces

This ensures the prefab is fully portable and ready for use in any simulation context built with realvirtual.

Scene Mesh Handling

Unlike Unity’s standard workflow, realvirtual's Create Prefab works seamlessly even when:

  • Meshes are still embedded in the scene, for example after a CADLink import

  • Meshes have been combined using the Combine Meshes utility

It acts similarly to an FBX export, but instead of creating an external file, it generates a single prefab containing all geometry, hierarchy, and logic in one asset—ready for reuse and versioning in your simulation workflows.

When to Use

  • After optimizing an imported CAD structure

  • When creating reusable standard components

  • When preparing modular assets for parts libraries or versioned assets

  • Before exporting or distributing simulation-ready components

How to Use

  1. Select the root GameObject Choose the GameObject that includes all child objects and components you want to include in the prefab.

  2. Run Create Prefab Right-click on the selection in the Hierarchy and choose: realvirtual/Create Prefab

  1. Result The prefab will be automatically created under the Assets/ folder of your project.

  1. Organize If needed, manually move the prefab to your desired location within the Unity project (e.g., Assets/Prefabs/[ExportedPrefab]).

📦 The resulting .prefab file contains the full structure, geometry, and behavior. It’s fully reusable across scenes and projects and supports realvirtual's simulation features out of the box.

PreviousCombine Meshes (Pro)NextHierarchy Cleanup (Pro)

Last updated 20 days ago

Create prefab in Gameobject context menu
Exported prefab