Configuring Unity for VR Training with Motive
In depth learning on the basics of the Motive SDK can be found in this course in Motive Academy.
The Motive Unity SDK is designed to streamline the development of immersive experiences using Unity. With Motive, content creators can take unprecedented control over a Unity scene using Storyflow, a drag-and-drop authoring tool designed for creative professionals.
Requirements
The Motive Unity SDK has currently been tested on the Unity 2021.3.x LTS stream.
Quick Start
The Motive Unity SDK Setup - Unity Workshop Demo Scene walk-through will take you through the steps of installing the SDK from scratch in Unity’s demo Workshop Scene.
Try out some of the Recipes to start setting up your scene to be usable using Storyflow.
Dig in deeper to the features offered by the dozens of specialized components offered by the SDK here Unity Components.
Deep-Dive
The following sections describe the SDK elements used to configure a Unity Scene to work with Motive in detail:
- The World
- Motive Prefabs
- VR App Configuration and Objects
- Setup — Manages configuration and startup of the app. The components specified after App Setup can be dragged into one of Pre Init, Init, or Startup Components to use.
- Script Runners — Configures the behaviour of the “Script Runners”--(AKA Scenarios in Storyflow). Allows you to toggle which Scenarios are visible during development. By default, shows “In Development” and “Draft” scenarios when launching from Storyflow (which is generally the case during scenario development).
- Webcam — Sets up a provider for handling attached Webcams, generally used for mobile & AR.
- Content — Handles providers for content: Playables, Guides, Annotations, etc.
- Panel Manager — Coordinates all Panels in the system. Derives from Panel Container. These settings are used by default, but any Panel that belongs to a Panel container will use that Container’s properties.
- Range Manager — Monitors relative World Object ranges for Object Proximity Condition and other components.
- Build Settings — Configures settings for different build configurations. These settings are used by other components to enable/disable features.
- Object Highlighting — Manages object highlighting for different uses.
- Equip Manager — Manages Equippable Objects and Equip Targets.
- XAPI Reporter — Manages XAPI reporting. The MOTIVE_XAPI build define needs to be set for this to work.
- Avatars — Manages Avatar configuration. Avatars are defined as any World Object with an Animator attached with “isHuman” set to true.
- Accessibility Settings — Manages Accessibility Settings set in the Accessibility admin panel.
- World — Settings for the World.
- VR App Configuration and Objects
- Unity Components
- World Object Behaviour — WorldObjectBehaviour is the root type of any object tracked by World Object Manager. These objects can be controlled and monitored with Storyflow. MotiveSceneObject derives from WorldObjectBehaviour. WorldObjectBehaviour is also added to any item spawned dynamically if it does not already have a WorldObjectBehaviour attached.
- Motive Scene Object — A Scene Object is an object in a Unity scene that can be targeted by name. A Scene Object may be part of the base scene or deployed via Asset Bundle.
- Equippable Object — Allows an object to be “equipped” by a user, e.g. PPE. An Equippable is often a root object configured with one or more subobjects that represent different states. Equippables can be equipped onto “EquipTargets” which are built into the VR Player Prefab.
- Equippable Provider — Allows you to specify the source for Equippables that you can equip directly using a Script instead of the user doing it themselves. The system will look for Equippable Providers first, then if none are found will look for the nearest Equippable with the given name in the Scene.
- VR Grabbable — Makes an object “Grabbable” using the grip button on a VR controller.
- VR Grabbable Instantiator — Allows the user to grab any number of identical items from a dispenser: e.g. nitrile gloves, paper towels, chemical test strips, etc.
- Attachables — Attachables and Attach Receivers allow you to configure objects that can attach to each other in a scene.
- Joints — The Unity SDK includes components to help configure Unity joints for a number of common tasks, including setting and monitoring limits, etc. These joints use Unity’s Configurable Joint behind the scenes.
- Hinge Joint — A Joint that rotates around a single axis.
- Sliding Joint — A joint that slides along the defined axis.
- Fixed Joint — A joint that is fixed to another Rigidbody and cannot move.
- Joint Effects — Allows you to add common effects to Joints (haptics, sound effects, etc).
- Usable World Objects — Usable World Objects are used by the “Use” or “Use Tool” actions in Storyflow. The “use” action is defined by a separate Usable Action component (below).
- Usable Touch Action — Fired when this object touches any other object with a World Object Behaviour on it. Useful for tools like drills, screwdrivers, etc.
- Usable Point Click Action — Configures an object to allow for a “point and shoot” type of mechanic, like a spray bottle or scanner.
- User Touch Action — Action that fires when the User touches this object. Useful for buttons, other control surfaces.
- User Click Action — Action that fires when the User points and clicks at this object with a controller.
- Play Sound Effect — Used to play a randomized short sound effect. Useful for Foley effects like dropping items, etc.
- Configuring Objects for UI
- Behaviour Models
- Boolean State Listener — Base class for any state listener that listens for Boolean states.
- Boolean State Setter — Used to set a Boolean State.
- Animator Controller State Listener — Allows complex animation controllers to be managed with a Variable. E.g., a patient’s position is controlled with an Enum: lying down, sitting up, lying on right side, etc. The AnimationStateListener will find an optimal path through the animator to properly handle all transitions for each state change.
- Dial State Handler — Monitor and set the state of a “dial”: any object that rotates around a point. Can be used to set the dial to discrete values.
- Joint Boolean State Setter — Monitor a Joint and set a Boolean based on the current position of the Joint (upper limit, between limits, lower limit). E.g., can be used to monitor an “open” state.
- Joint String State Setter — Monitor a Joint to set a string value. Best used when defining a state as an Enum (e.g. “in” vs “out” for a drawer or other sliding Joint).
- Boolean Animation State Listener — A simple state listener for driving an Animator using a Boolean State.
- Attachable State Listener — Manages the state of an Attachable based on an Object State (see Attachables).
- Double State Listener
- Double Animation State Listener
- Listeners, Setters, and Two-Way Links
- Animations
- Recipes
- VR Grabbables & Unity Joints
- VR Grabbable Unity Setup -> Grasp Resource (Storyflow)
- Lever — Use a grabbable and a hinge Joint to create a lever with limited motion.
- Door
- Car Door with Behaviour Model
- Sliding Joints
- Slide to Remove
- Mechanical Sliding Joint
- Door Hinge Joint Example
- Make Attachable / Using Attachable Receivers
- Equippables
- Motive Scene Object Example
- Scene Anchors
- Usable Objects
- Behaviour Model Configurations
- Using Animations
- Sound Effects — Good sound effects in a VR experience go a long way to add to the realism.
- Equippable Sound Effects — Use sound effects to improve the user’s experience of an equippable.
- Using Attachables and Fixed Joints alongside VR Grabbable
- Scene Regions
- Using State Machines to Change Properties
- VR Grabbables & Unity Joints
- Asset Pipeline
- Using AssetBundles
- Characters and Character Actions
- Multi-Scene Setup
- Motive Unity SDK Components -> Storyflow Resources