Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The following steps will setup a basic scene to synchronize a Vector parameter.
Object Visibility
1. Reference Space Connection
a. Attempting to post a property update to a Space before the connection is complete will throw an error.
b. The Cavrnus blueprint “Await Any Space Connection” allows you to bind a custom event that will be issued once the connection is made.
c. This technique assures that no updates will be attempted until a valid Space is connected.
d. Store a pointer to the Space as a variable. This will serve as a convenient reference for future steps.
2. Bind UI Properties to Journal
When using a User Interface to interact with synchronized scene objects, be sure to update the state of the user interface as part of the workflow.
a. Use a custom event to bind the property of the UI component to the Journal. This will update the UI when changes are made in the Journal.
b. Note the variable references to the Bind Property blueprint. The String variables can be set directly in Class Settings, or in the field of the Blueprint graphIn this example, there is no feedback in the menu that requires update from the Journal. The SetupUI event flows straight to the Post Property blueprint.
a. The variables reference the connected Space, the color options, and data location strings for the Journal.
i. Space Connection: The reference to the Cavrnus Space assigned in Step 1.
ii. Container Name: The name of the container (String) in the Journal where the property value can be located. (NB: This is Case Sensitive.)
iii. Property Name: The name of the property (String) in the Journal that stores the specific property value. (NB: This is Case Sensitive).
iv. Colors: An array of color vectors corresponding to the menu options.
c. Pass the resulting value to a setter for the local UI component stateFrom here, the “Set Up” function flows straight to Step 4.
3. Bind Scene Properties to Journal
While the local UI update could be passed on to the local scene properties through blueprint interactions, it is recommended to update the scene properties directly from the Journal to ensure valid entriesIn this example, the parameter to bind is the “BaseColor” property of the Dynamic Material Instance (MID). This property expects a color vector, so we first assign the MID to the static mesh, then bind the “BaseColor” setter function to the Color Property Value function with the corresponding container/property location in the Journal.
a. Use a custom event to bind the “BaseColor” property of the object object’s material to the Journal. This will trigger an update to the local instance when changes are made to that container/property in the Journal.
b. Note the The variable references to the Bind Property blueprint. The String variables can be set directly in Class Settings, or in the field of the Blueprint graph.
i. Space Connection: The reference to the Cavrnus Space assigned in Step 1.
ii. Container Name: The name of the container (String) in the Journal where the property value can be located. (NB: This is Case Sensitive.)
iii. Property Name: The name of the property (String) in the Journal that stores the specific property value. (NB: This is Case Sensitive).
c. Pass the resulting value to a setter for the local propertyare the same as above, corresponding to the connected Space, and the Container/Property string values.
c. When the Container/Parameter value in the Journal is updated, the value is assigned to the BaseColor of the Sphere’s material.
4. Post Color Property Updates From Interaction
Image RemovedImage AddedThe last step in the cycle is to post updates to the Journal as changes are made in the local scene. This can be triggered by object reference events or directly from the User Interface, if one is used in the sceneIn this case, this step flows through the menu widget from Step 2.
a. Trigger the update using an event trigger in the scene. Be sure to use an event trigger that will occur frequently enough to keep the Journal current. However, avoid generating too many updates from high frequency events, such as Tick events.
b. Post the Boolean Color Property using the Cavrnus “Post Bool Color Property Update” blueprint.
c. Be sure to confirm Container and Property string values match with other users connected to your Space.
ON THIS PAGE
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Info |
---|
References:For more information on these Cavrnus blueprints, refer to the Cavrnus API Reference . |
Tip |
---|
Next Steps The object in the scene is configured to toggle on and off in sync with both the local UI and the Journal. Next, let’s Synchronize Light Colors and Materials! |
Auibutton | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Auibutton | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|