LogoLogo
Reality 4.27
Reality 4.27
  • Reality 4.27
    • What's New
    • Introduction to Reality
    • Reality Walkthrough
      • Reality Examples Project
      • Tracking Calibration and Fine Tuning
      • Real-Time Ray Tracing
      • Raw Input
      • Augmented Reality Virtual Studio
      • Green Screen Virtual Studio
      • Setting up Realtime Video I/O
      • Projection Cube
      • Cyclorama Setup
      • Reality Keyer and Fine Tuning
        • Keyer FOV Softness
    • Reality Editor Guide
      • How Reality Editor Works?
      • Exporting UE4 Actors to RealityHub API
        • ZDActor Component
        • Exporting Blueprint Functions
        • Texture Pins on ZDActors
        • Exporting Properties
          • Directly Readable Variable Types
          • Property Update Callbacks
            • OnChanged_Event Callback
            • OnLengthChanged_Event Callback
            • OnChanged_ Function Callback
            • OnLengthChanged_ Function Callback
      • Exporting Assets to Reality API
        • Exporting Actors
        • Exporting Custom Blueprint Node
        • Exporting Custom Material Node
        • Exporting Lens Calibration
        • Exporting Post Process Material
        • Exporting Projection Material
        • Exporting Static Mesh
        • Exporting Unreal Motion Graphics
        • Exporting Unreal Texture Assets
      • Reality Custom Material Nodes
        • Defining the Variables in Material Definition
        • Custom Material Node
      • Using UMG in Reality
        • How to Use UMG with Reality
        • UMG Animations
        • Texture Brush
        • Asset Brush
        • Exporting Custom Events in UMG to Reality API
      • Additional ZD Components
        • ZDPieChart
        • ZDText
      • Helpful Links
      • Reality Editor Settings
        • Enabling DX12 and Ray Tracing
        • Hardware Accelerated Video Decoding
        • Enabling HAP Codec
    • Reality Setup Application
      • Audio
        • Audio Delay Node
        • Virtual Set Audio
        • Audio Mixer
      • Bypass Post Process
      • Fill and Key
        • Fill and Key using Dual-link
        • Fill and Key using Quad-link
      • Crop Function
      • Level Sequencer
      • Color Matrix Node
      • Media Playback
      • Preset for H.264 in Adobe Media Encoder
      • HAP Video Codec
      • Flow Control
      • GPUDirect Technology
    • Installation and Configuration Guide
      • Hardware Platforms
        • Legacy HP Z4G4 Configuration
          • Fan and Front Card Kit
          • Certified Power Supply
          • Video I/O Card Installation
            • Mellanox ConnectX®-5 Card Installation
            • AJA Video I/O Card Installation
          • GPU installation
            • Certified GPUs
            • Connecting GPU to 1000 watts power supply
              • GPU RTX 6000 installation (8+6 pin)
            • Connecting GPU to 750 watts power supply
              • GPU RTX 6000 installation (8+6 pin) Needs 6 to 8 Pin Adapter
          • Installing RAM
          • HP Performance Advisor
      • Adding Reality User to Windows
      • Downloading Distributions
      • Installing Steps
        • Upgrading
        • Installation
      • Configuration Steps
        • NVIDIA Configuration
        • AJA Video Card Configuration
        • R Drive Mapping
        • Internet Options
      • Updating RealityEngine AMPERE
    • Licensing Guide
      • Hardware Licensing
    • Reality Tutorials and Examples
      • Reality Editor Tutorials
        • Open/Close Door
        • Exporting UE Actor to ZD API (a.k.a ZDActor)
        • Custom Blueprint Node Tutorials
          • Using Event Tick Functions and Properties
          • Adding Custom Blueprint Nodes
        • Redirection of the Reality Engine Content
        • Creating Dynamic Materials
        • Changing ZDText with Dynamic String
        • Activating Destructible Mesh
        • Reality Texture Input
        • Activating Fire During Runtime
        • Asset Migration to Another Project
        • Rotating Door by Using Function Parameters
        • Creating Custom Cyclorama
      • Nodegraph Tutorials
        • Portal Window Setup
          • Adding Clipping Plane
          • How to Position Videowall
          • Setting Portal Window and Calibration
          • Creating the Augmented Part
    • Appendices
      • A - Camera Tracking and Lens Calibration
        • Camera Tracking Information
        • Tracking Device, Physical Connections
        • Lens Calibration
      • B - Standard Unreal Engine Post Processing Pipeline
      • C - Reality Keyer
        • What is Image Based Keying?
        • Reality Keyer Pipeline
        • Physical Factors Affecting the Key
      • D - Viewing Videomask
      • E - CLASS setting for Broadcast Cameras
      • F - ZD Blueprint Node Pin Reference
      • G - Utilizing TRAXIS talentS FreeD Data
    • Knowledge Base
    • Known Issues and Limitations
Powered by GitBook
On this page
  • Rules of using OnChanged_ Function Definition
  • Implementation of OnChanged_ Function Binding For Variables
  • Using OnChanged_ Function Binding For Arrays
  1. Reality 4.27
  2. Reality Editor Guide
  3. Exporting UE4 Actors to RealityHub API
  4. Exporting Properties
  5. Property Update Callbacks

OnChanged_ Function Callback

PreviousOnLengthChanged_Event CallbackNextOnLengthChanged_ Function Callback

Last updated 2 years ago

OnChanged_ function binding is a function definition pattern whıch can be called when a specific variable or array index is changed on RealityHub. The OnChanged_FunctionName (with underscore) pattern triggers any node-base mechanism when the property has changed on run-time. You can also bind OnChanged_ function binding for arrays returns the index of changed property on Reality API. The changed index on the Reality API executes the blueprint function with the changed index number.

Rules of using OnChanged_ Function Definition

  1. The variable and function you want to expose must be declared as Public. (instance editable).

  2. The function created on the event-graph must follow this format: OnChanged_AnyVariableName (The underscore character after OnChanged is required).

  3. After OnChanged_, the function name must be the same as the variable name.

  4. The developer must take care of Case Sensitive for functions.

  5. If you bind your array for the OnChanged_ pattern, only one integer parameter must be aware of the changed index.

Functions and variables must be "Public," and function names are Case Sensitive.

Implementation of OnChanged_ Function Binding For Variables

  • Create a new Actor class object. Click ADD NEW on Components tab. Add ZD ACTOR.

  • Create a new variable named MyVariable with the variable type of Integer. Make it public(instance editable).

  • Create a new function. Change name of the function as OnChanged_MyVariable

The function name must follow this pattern OnChanged_VariableName

  • On the graph, switch the MyVariable and print string regarding values. After complete, the graph, click on the COMPILE and then the SAVE.

  • Put your actor to the level.

  • Launch Reality Setup.

  • Click Play from the top menu on Reality Editor.

  • Click on the actor that you created on Reality Setup.

  • Change the MyVariable to the 1 and 2, and 0. Check results.

  • A debug message will be displayed on the Output Log Window in Reality Editor. Click on the Window > Developer Tools > Output Log

Using OnChanged_ Function Binding For Arrays

You can bind a blueprint function executed when the array variable has changed on Reality Setup. You can get a specified index that changed. The function name must follow this pattern OnChanged_ArrayName (underscore is required.)

Steps

  • Create a new Actor class object. Click ADD NEW On Components tab. Add ZD ACTOR

  • Create a new array variable.

  • Create a new function and name it as OnChanged_ArrayOfFloats

  • Click the function that you created. Add Integer parameter named as Index.

The function works only if it takes one parameter as a type of Integer.

  • Connect the nodes as shown below.

  • Put your actor to the level.

  • Launch Reality Setup.

  • Click Play from the top menu on Reality Editor.

  • Click on the actor node that you created and add items onto the array and change of values.

  • Check output log, and the Reality Editor executes the function with the specified index.