Network State Modules

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.

A Network State Module_Transform script configured to synchronize the transform in the local game object

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.

A Network State Module_AFX Float script configured to synchronize the float component on the same game object

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:

Example arrangement of network state modules in an IFX

Last updated