Setup Unity project to use Vortex Studio
Installing the Vortex Studio integration package in Unity
Installing the Vortex Studio integration package involves downloading Vortex Studio.
Of course, to be able to use the integration package, you need to install Vortex Studio and to have a valid license.
To use the Vortex Studio integration package, you must have the proper versions of Vortex Studio and Unity installed.
The package has a dependency on Unity's High Definition Render Pipeline (HDRP) package, so make sure to install it using the Package Manager, if it is not installed already. It can be installed at project creation from the Unity Hub by downloading and selecting one of the 3D (HDRP) project templates (Core or Sample).
Installing the Package
Use the Unity Package Manager to add the package that is included as a tarball (.tgz file) in your Vortex Studio installation. Here are the steps required to install the package in a Unity project:
Open your Unity project in the Unity Editor. A Unity project is typically opened from the Unity Hub application, from where it is created. If already present, it can be added to the Unity Hub with the Open button.
With your project open in the Unity Editor, navigate to the the top of the screen, and find the Window menu.
From the Window menu, find and click on the Package Manager button.
This will now open the Package Manager window, from where you can install or uninstall Unity packages.
To add a new package, find and click on the “+“ button in the top left of the window:
It now gives you some options to install a package. To install a package from a tgz file (tarball), you need to click on the Add package from tarball button:
The Vortex Integration package is contained in this file: com.cmlabs.vortex.integration.unity-202X.X.X.tgz. It can be found at C:\CM Labs\Vortex Studio 202X.X\bin\unity\com.cmlabs.vortex.integration.unity-202X.X.X.tgz. Select it in the file browser to install it in your project.
Package is now installed in the project
Configuring the .NET Framework API compatibility level for the project
Right after installing the Vortex Integration package in your project, you might encounter the following errors from Unity, found in the Console panel:
The Vortex integration package is only available for Windows and uses advanced features of the .NET Framework. These features are not enabled by default. This is why a new project would get these errors.
To enable these advanced features, a project setting must be updated. The Unity project’s API Compability Level must be set to .NET Framework. Here is how to change this setting:
In the Unity Editor, navigate to the Edit menu in the top left. Towards the bottom, you will then find the Project Settings… button.
Click on it to open the Project Settings window. Select the Player category, and expand the Other Settings panel.
Scroll down until you find the Configuration section. From the dropdown next to Api Compatibility Level*, select the .NET Framework option.
Once done, Unity will reload all script assemblies in the project and package, and the errors will no longer be present.
Your project is now ready to use the Vortex Studio Integration! You can start by creating a Unity scene and associate it with a Vortex Scene.
Unity event loop must be running even when the 3d window does not have the focus
Since in a simulator, the operator does not interact directly with the 3d windows, it is essential that the Unity render loop runs even when the 3d window does not have the focus. Unity will needs to call FixedUpdate() regularly for Vortex to be updated, otherwise, the simulator will appear to be frozen or hanging, but it will merely wait to be told to continue updating.
In order to do so, in Player settings, under the section Resolution and Presentation, you will find Run In Background. This needs to be checked.
Â
Using a specific Vortex Studio installation
When installing the Unity package into your Unity project, your Vortex installation will be found automatically.
In the specific case where you want to manually specify the location of Vortex Studio, please use the Vortex Settings menu item and enter the path of your Vortex installation directory, then save the settings.
It is recommended that you restart the Unity Editor after changing the Vortex Toolkit Path.