The RIDE standalone application features a collection of example scenes that display key capabilities of the API. This application can be built locally with custom scenes added to the existing LevelSelect scene sub-menu listings for your own demonstration purposes.
This tutorial is geared toward developers and researchers working with the RIDE project source and new to the Unity development platform. Topics covered include basic scene creation, script modifications, adjusting scene parameters and building a standalone executable for desktop systems.
Currently, in order to modify and compile locally the LevelSelect scene in Unity, your RIDE Distribution Agreement must include the full RIDE SDK source, which serves as the basis for the RIDE standalone application.
Users new to RIDE and Unity will want to ensure their development environment is completely setup before continuing further. If already setup, users may skip to the LevelSelect modification section.
IMPORTANT Note, under 2020.3.x, Microsoft.Extensions.Logging.Abstractions.dll and NonverbalBehaviorGenerator.dll need to be manually excluded from being compiled by unchecking their respective Import Settings inside the Inspector pane. |
The Unity Hub utility controls which versions of the platform are installed on the local machine.
Refrain from acquiring any version of Unity from the Hub for the moment. See next section for Unity installation steps.
With Unity Hub now installed, locate the runUnity.bat file at the top level of the RIDE repository; certain users will find it under \trunk. When first initialized, this process calls Unity Hub for a “headless” (background) automatic installation of the proper version of the Unity editor and modules for the project. (Remain connected to the Internet during the next set of steps.)
Important Always use runUnity.bat to open the RIDE Unity development environment. This will ensure you are using the correct version of Unity every time. Do not launch the RIDE project through Unity Hub. |
Tip If the “headless” installation process fails, the desired version can be acquired through the Unity Archive page, https://unity3d.com/get-unity/download/archive
|
External organizations may request access to the full RIDE SDK source code via, https://ride.ict.usc.edu/getting-started/obtain-ride/
Version control software (VCS) allows the tracking of individual file changes inside of a code base. In the event a “breaking” code change is committed, these changes can be easily compared against prior versions of the file(s) using the VCS client, and the file(s) reverted to another “known good” version.
Advanced text editors tailored to script and source code will help avoid mistakes that can occur when editing these types of files in a standard text editor or word processor.
Achievement Unlocked! Now that all of the development environment requirements have been met, the RIDE project and LevelSelect scene can be modified as desired. See next section for instruction. |
If new to Unity and RIDE environemnts, recommend first creating the most basic test scene that can launch from, and return to, the LevelSelect scene Featured listing.
Modify the script to appear exactly as the provided code block example; however, replace the “public class” value of “ExampleTest” with the name of your newly saved scene. This new class is derived from “RideBaseMinimal” which enables the bare minimum of RIDE systems, including load/exit of the individual scene within the LevelSelect scene.
using System;
using UnityEngine;
using Ride;
using Ride.IO;
using Ride.UI;
namespace Ride.Examples
{
public class ExampleTest : RideBaseMinimal
{
}
}
Achievement Unlocked! Now that the test scene is compatible with the LevelSelect scene, it can be further developed or added to the LevelSelect scene Demos listing. See next section for instruction. |
Important New scenes must be added to the Unity project’s Build Settings list in order to then appear in the LevelSelect scene listings at run-time. See next section for instruction. |
Any new scenes included as Scene Description entries must also be added to the Unity project’s Build Settings list in order to appear in the LevelSelect scene Featured listing at run-time.
After including any desired new scenes to the Build Settings and ensuring their respective Scene Descriptions entries are complete, verify the scenes appear as expected in the Featured listing at run-time.
Ensure open and closed ellipsis align with previous entries and that final closed ellipsis followed by a comma.
static readonly Dictionary m_capabilities = new()
{ CapabilityFlags.Test_Capability, new Capability { name = "Test Capability", description = "Test Capabilities option" } },
LevelSelect.cs
static readonly Dictionary m_projects = new()
{ ProjectFlags.TEST, new Project { name = "Test Project",
acronym = "TEST",
description = "Test project option.",
url = "https://ict.usc.edu/" } },
Important Capabilities and Integrated Projects additions must also be referenced as enumerator Flags within LevelSelect.cs in order to then appear as options inside the Capabilities and Related Projects dropdowns of the Scene Descriptions sub-properties. See next section for instruction. |
[Flags]
public enum CapabilityFlags
Test_Capability = 1 << 15,
[Flags]
public enum ProjectFlags
TEST = 1 << 11,
After including any desired additions to Capabilities and Projects dictionaries and adding their respective enumerator Flags within LevelSelect.cs, verify the entries appear as expected inside their respective dropdowns of the Scene Descriptions sub-properties.
Tip Scene entries under Features, Multiplayer, and Tutorial listings’ respective Scene Description sub-properties can be reordered within the panel by simply clicking and dragging from the the double-line icon next to each entry. |
Achievement Unlocked! On account of the LevelSelect scene now successfully customized with new content, a new version of the standalone application can be built locally for demonstration. See next section for instruction. |
Unity provides various options to configure a standalone application prior to building locally.
Important If distributing the local executable within your organization, compress (zip) the entire contents of the unique sub-folder. The executable is dependent upon the various resources within it. |
Resources to build familiarity with the Unity editor and application development.
Unity Scripting API, Version 2022.1