Table of Contents

Actions

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

VIROO Studio provides a large number of predefined Actions that can be used to fill your scene with interaction in a very simple way: move objects, play animations, play videos and audios, activate and deactivate objects, instantiate GameObjects through the Networking system...

In addition to this, actions expose events so you can also execute your own logic using UnityEvents when they are 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 your Scene'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, while LocalExecute will cause the Action to be executed only for the user who invokes the Action.

The invocation of Actions persists on the server, so if a user joins the session later than the others, the previous executions will also be triggered on their instance of the Scene, so that the state of the Scene is consistent with that of the rest of the users in the session.

All actions contain an IsEnabled property, which allows them to be enabled or disabled. Disabled Actions do not execute their logic when they are 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 will not be executed if it is called. By default, Actions always start active.
Should Persist Actions may be configured to persist so that users who join the session later have a consistent state. If a user joins later, actions that have already been executed will be executed for them as soon as they join the session.

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.