This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

VR Project Migration

Upgrading your VR project in SDK Browser using the Upgrade option is not enough to build it — additional manual operations are required.

Essentially, you'll need to create a new 2.18 VR project and copy the required files to your project that has been upgraded to 2.18 from a n earlier version. Before copying files from a template project, you need to delete identical and unnecessary files from your project (otherwise, new files won't be added properly).

Notice
This version of the article reviews the process of upgrading of C# VR projects only. You can switch to the C++ version in the upper right corner of this page.

Now let's go step by step.

Migrating a VR Project
#

  1. Create a new 2.18 VR project using the VR Template. Open it in the editor and create a package of vr_template\layers\vr_layer.node. You can close this project. (But don't delete it yet.)

  2. In SDK Browser, click Upgrade for your project to upgrade assets in your project to 2.18.

  3. Open your project in Editor and close the world, you'll need Asset Browser only.
  4. You can try to import the package you exported from the empty 2.18 template project at Step 1. You'll see the assets highlighted red (they actually duplicate the ones that exist in your project) — delete duplicate *.cs assets from your project, then cancel importing the package.

    Namely, delete the following folders and files:

    • vr_template/components/

      • base
      • controllers
      • movements
      • ui
      • vr_input
      • VRPlayer.cs
    • vr_template/components/interactions/

      • interactions
      • VRInteractionManager.cs
    • vr_template/components/interactions/interactable/

      • VRNodeSwitchEnableByKey.cs
    • vr_template/components/transformations/

      • VRAttachToHead.cs
    • vr_template/layers/

      • vr_layer.node
  5. In the vr_template/components/interactions/interactable/ folder delete VRKinematicMovableObject.cs, VRPhysicMovableObject.cs, VRTransformMovableObject.cs and copy the identical files from the template project created using 2.18 SDK version.

    Notice
    If you modified any of these files, make a backup to modify the updated files later.
  6. Import the package you exported from the empty 2.18 template project at Step 1.
  7. Update the code (written by you) that interacts with the template components that have been changed.

Launching App in VR Mode
#

Launching in Editor
#

In order to launch your app from Editor in VR mode you need to add the -vr_app openvr start-up parameter. However, if you already launched Editor with -vr_app openvr, SteamVR will force close Editor if it detects new application start.

To fix this you need to do the following:

  1. Before launching Editor, make sure that Stereo 3D is disabled in the SDK Browser Global Settings:

  2. Make sure that you have no additional start-up arguments enabling VR in Open Editor custom run options:

  3. Open Editor and load your world that you want to run in VR.
  4. In application start-up settings modify the Arguments field: add -vr_app openvr.

  5. Make sure to choose correct Configuration (Debug / Release).
  6. Press the Play button.

If everything is done correctly, your application will start in VR mode and Editor will be still functional.

Launching in IDE
#

Running a VR project from the IDE requires adding command-line arguments. For example, in Visual Studio you can do this way:

  1. Open the project Debug Properties:

  2. In Command line arguments, add -vr_app openvr at the end of the line:

Notice
Make sure to remove any arguments running the outdated VR plugins (such as
-extern_plugin UnigineOpenVR).
Last update: 2024-02-27
Build: ()