🧰
Developer
  • ENGAGE SDK overview
  • Setting up the ENGAGE SDK
    • Registering as an ENGAGE developer
    • Setting up your local git repository
    • Installing the Unity Editor
    • Opening the ENGAGE SDK Unity project
    • Checking for SDK updates
    • Installing a platform build module
  • ENGAGE SDK project folders
  • General guidelines for 3D models
    • Optimizing 3D models
  • Locations
    • Guidelines for locations
    • Creating a new location
    • Building a location bundle
    • Testing a location locally on Windows
    • Configuring an object as a teleport target
    • Configuring the start position
    • Seats
      • Creating a seat
      • Using the summon to seat system
    • Network states
      • Network State Manager
      • Location Network States
      • Example network state configurations
        • Network state toggle object
        • Network state animation start/stop
        • Network state change animation
          • Creating an animation in Unity
          • Using Animator.Play(string)
          • Defining Animator transitions
          • Using Animator.SetTrigger(string)
        • Network state sync animation
        • Network state position toggle
        • Network state automatic door
        • Network state toggle skybox
        • Network state change materials
    • Adding grabable objects to a location
      • Resetting network objects with a button
      • Resetting network objects when out of bounds
    • Locations reference information
      • Basic requirements for a location
  • Immersive Effects (IFX)
    • Guidelines for IFX
    • Creating an IFX
    • Building an IFX bundle
    • Testing IFX locally on Windows
    • Specialized IFX
      • Animated IFX
        • Animation overrides
          • Legacy animations
          • Animator animations
          • Configuring additional Effect Life Run Control properties
      • Audio IFX
      • Interactive IFX
  • List of available prefabs
  • Available scripts
    • External Video Player
  • Profiling
  • Publishing to ENGAGE
    • Publishing checklists
    • Pushing files to your GitHub repository
  • AFX
    • Getting started
      • Changelog
    • AFX Graphs
      • Creating an AFX graph
      • Editing an AFX graph
      • Navigation and keyboard shortcuts
      • Adding an AFX graph to a game object
      • Nodes
      • Ports
      • Connections
      • Flows
        • Starting a flow
        • Using multiple flows
        • Chaining flows
        • Controlling flows
      • References
      • Using AFX Events
    • Networking AFX
      • Network State Modules
      • Ownership of networked objects
    • Animation curves
    • Node dictionary
      • ENGAGE
        • AFX Companion
          • Constant Collision
          • Grab Object
          • PathData
        • Networking
          • Network State Modules
        • Physics
        • Player
        • Seat
      • Events
        • Collision
        • Unity
        • AFX Events
      • Flow
      • Reference
      • Unity
        • Component
          • Animation
            • Set Parameters
          • Audio
            • Audio Reverb Zone
            • Audio Source
          • Collider
          • FX
          • Rendering
            • Camera
            • Light
            • Material
          • UI
        • Constraint
        • GameObject
        • Input
        • Physics
          • Raycast
            • Layer Mask
          • RigidBody
            • Joint
              • Hinge
              • Spring
          • Wheel Collider
        • Time
        • Transform
          • Get
          • Set
          • Space Switching
      • Variable
        • Bool
        • Comparison
        • Float
        • Int
        • List
        • Math
          • MathF
        • String
        • Unity Component
        • Vector
          • Quaternion
          • Vector2
          • Vector 3
            • Vector3 Math
    • Sample graphs
Powered by GitBook
On this page
  • Using the transform Network State Module
  • Transform Network State Module settings
  • Using a variable component Network State Module
  • Using Network State Modules in IFX
  1. AFX
  2. Networking AFX

Network State Modules

PreviousNetworking AFXNextOwnership of networked objects

Last updated 7 months ago

Network State Modules are scripts that manage the synchronization of objects and values between multiple users in an ENGAGE session. The most commonly used Network State Modules are as follows:

  • Network State Module_Transform

  • Network State Module_AFX Bool

  • Network State Module_AFX Float

  • Network State Module_AFX Int

In each case, you add a reference to a transform object or a variable component to the Network State Module, and then the module ensures that the referenced object or component is synchronized between all users.

Using the transform Network State Module

You can use a Network State Module_Transform script to synchronize object transformations between multiple users in an ENGAGE session. A single module can synchronize multiple transforms.

To use a Network State Module_Transform script, complete the following steps:

  1. Select a game object. This game object can include one of the transforms that you want to synchronize, but it isn't a requirement.

  2. In the Inspector panel, add a Network State Module_Transform script.

  3. Optional: If the game object will be included in a location, enter a value in the Unique ID field. The value must be unique within the Unity scene.

  4. Optional: If you want changes to the transforms to be include in recordings, select the Recordable check box.

  5. For each transform that you want to synchronize, complete the following steps:

    1. In the Transforms list, select the plus symbol to add a new item.

    2. Configure the settings as required. For more information, see Transform Network State Module settings.

    3. Drag the game object that you want to synchronize a transform for onto the Transform field.

  6. Optional: If the game object will be part of an IFX, complete the additional steps described in Using Network State Modules in IFX.

Transform Network State Module settings

The following settings are available for each transform that you want to synchronize.

Setting
Description

Interpolate

If selected, when the ENGAGE application receives a new transform object from the network, it will perform a linear interpolation from the old transform values to the new values over multiple frames. If cleared, the new transform values immediately replace the old values. We recommend that you always select this value so that transitions are more smooth and natural.

Network Sensitivity

Leave at the default value.

Network Position

If selected, the position component of the transform is synchronized across the network.

Network Rotation

If selected, the rotation component of the transform is synchronized across the network.

Network Scale

If selected, the scale component of the transform is synchronized across the network.

Transform

Reference to the transform that you want to synchronize.

Using a variable component Network State Module

The Boolean, integer, and float versions of Network State Module scripts have a similar structure and usage. You can use them to synchronize the value stored in a variable component between multiple users in an ENGAGE session. A single module can synchronize multiple variable components of the same type.

To use a variable component network state module script, complete the following steps:

  1. Select a game object. This game object can include one of the variable components that you want to synchronize, but it isn't a requirement.

  2. In the Inspector panel, add the required network state module script. You can choose either a Boolean, integer, or float version.

  3. Optional: If the game object will be included in a location, enter a value in the Unique ID field. The value must be unique within the Unity scene.

  4. Optional: If you want values changes to be include in recordings, select the Recordable check box.

  5. For each variable component that you want to synchronize, complete the following steps:

    1. In the Afx <type> list, select the plus symbol to add a new item.

    2. Drag the game object that includes the variable component onto the Element field.

  6. Optional: If the game object will be part of an IFX, complete the additional steps described in Using Network State Modules in IFX.

Using Network State Modules in IFX

If you use Network State Module scripts to synchronize objects or values in IFX, complete the following additional steps:

  1. Add an IFX Network States Effect script to the root game object in the IFX.

  2. In the Network State Modules list of the IFX Network States Effect script, add a reference to each Network State Module used in the IFX.

The following image shows an example configuration:

A Network State Module_Transform script configured to synchronize the transform in the local game object
A Network State Module_AFX Float script configured to synchronize the float component on the same game object
Example arrangement of network state modules in an IFX