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
      • 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
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables
      • 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
Edit on GitHub
  1. Components & Scripts
  2. MU, Source and Sink

Source

PreviousMU, Source and SinkNextSink

Last updated 18 days ago

By using a Source script, new movable units can be generated. MUs can be generated in intervals or automatically generated once the last generated has travelled a certain distance away from the source. This is useful to automatically generate on a conveyor. The object with the Source script attached to, is like a template. Each time a is created, the Source creates a new instance of the object under the defined root Destination in the scene hierarchy.

This tutorial shows how to create a custom source:

This is the property window of the source:

Properties

This Object as MU

Defines which part should be generated. Should normally point on the same Gameobject where the source component itself is attached to. This is also the standard setting.

Destination

When the source is generating a new MU it can be placed as a sub Gameobject under the defined Destination Gameobject.

Enabled

Must be set to true for the source to work.

Freeze Source Position

Should be usually set to true - the source will not change its position.

Don’t Visualize

Hides the source so that only the created MUs are visible.

Mass

Sets the Mass of the created MUs.

Set Center of Mass

Sets the Center of Mass of the created MUs.

Center of Mass

The Center of Mass.

Generate on Layer

Unity Layer where the MU should be placed to after creation.

On Create Destroy Components

Maybe some scripts on the MU, which is a copy of the source, should be destroyed when the MU is created. You can define here the components to be destroyed.

Create in Interval

Creates MUs in a constant interval in seconds. If the value is 0 this option is not used.

Automatic Generate On Distance

Automatically creates new MUs when the distance of the last created MU is greater than the defined value. Optionally the distance can be also randomly (equally distributed) between the defined Distance (“Generate if Distance”) plus / minus the “Range Distance”.

Number of MUs

Limits the number of generated MUs.

SourceIOs

Gernarate MU - should be turned on for making the source work.

Source Signals

PLCOutputBool Signal (e.g. from a PLC) for generating MUs.

Events

Unity Event which can be used for custom scripts which are called when an MU is created.

Public Interfaces

If script is attached to the Gameobject of the MU, which implements the Interface “ISourceCreated” a Method “OnSourceCreated” is called on the MU when it has been created by the MU.

Public properties and methods

The source can also manually create when you press “C”. The source will deletw all generated when you press “D” on the keyboard.

Please check the for more information about the properties and methods of this component.

© 2025 realvirtual GmbH - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

(MUs)
(MUs)
Realvirtual.io Class Reference
https://realvirtual.io
(MUs)
MU
MUs
MU
Tutorial custom sources