Table of Contents

Actions

Actions are a versatile tool provided by VIROO Studio to synchronize the logic between all users of a VIROO Session.

VIROO Studio provides many predefined Actions that can be used to fill your VIROO Application with interaction in a straightforward way. With Actions you can move objects, play animations, play videos and audios, activate and deactivate objects, instantiate GameObjects through the Networking system, etc.

Actions expose events so you can also call your own logic using UnityEvents when they're executed. Furthermore, there are Actions, called UnityEventAction and UnityEventNonBroadcast, that are specifically for use with UnityEvents. For more info in Unity Events go to the Unity Documentation.

You can also create your own Actions, extending the VIROO Interaction System to suit your needs. To learn more about this, go to Extend the Interaction System.

Actions can be called directly (from code or from others script's UnityEvents), by invoking the Execute or LocalExecute methods. The Execute function will cause the Action to be triggered on the instance of the Action caller and also on all other users in the session. Meanwhile, the LocalExecute function will cause the Action to be executed only for the user who invokes the Action.

The invocation of Actions persists on the server, as long as the Execute method has been performed and not the LocalExecute method. If a user joins the session later than the others, the previous executions will also be triggered on their instance of the VIROO Application. This way, the state of the VIROO Application is consistent with that of the rest of the users in the session. Refer to the documentation for each Action to see the exceptions to this.

All Actions contain an IsEnabled property, which makes it possible for them to be enabled or disabled. Disabled Actions don't run their logic when they're invoked.

All Actions have a common settings section:

Actions Common Settings
Field Description
Menu Label This text will appear in Menus where this Action can be selected. For more info, read Show Object Menu Action.
Starts Enabled Actions can toggle their status between enabled and disabled. A disabled Action won't be executed if it's called. By default, Actions always start active.
Persistence Type Actions can be set to persist, ensuring late joiners receive a consistent session state. Choose None to disable persistence, All to replay all executions, or Last to replay only the most recent one.

move-action.png

Check out the rest of the pages in this section to learn more about the Actions that exist and how to use them.