Requirements & Optimisation - LiminalVR/DeveloperWiki GitHub Wiki

Requirements

Supported Unity and .NET Versions

  • The only version of Unity we currently support is 2019.1.10f1
  • The only Scripting Runtime we currently support is .NET 4.x running on Mono as the Scripting Backend.

Programming Language

  • Liminal SDK is intended for use with C# scripts. Scripts written in UnityScript/JavaScript and Boo are not supported.

Single Scene

  • Experiences should consist of a single Unity scene.
  • Only this scene will be included in the .limapp package and attempting to load other scenes from your Unity project will not succeed.

Calls You Cannot Make

Do not call at any time:

Global State

  • Do not change Unity's global state from within your scripts
  • For example, Time.timeScale. It should always be left at the default value of 1.
  • Other examples include QualitySettings, Graphics etc.

Framerate

  • Experiences must maintain a minimum framerate of at least 60fps on all supported devices, in line with requirements for the GearVR and Google Daydream platforms.
  • Do not make your Experience framerate dependent, as Application.targetFrameRate does not work in VR. Build your Experience to be independent of framerate.

Graphics

  • Experiences must support Single Pass Rendering. Ensure that
    Edit > Project Settings > Player > Android > XR Settings > Stereo Rendering Method is set to Single Pass (Preview)

Sound

  • Ensure your sound files have been normalised. This will assist your sound levels in being similar to those within the platform.

Controllers

  • While your Experience is running, users can press the back button to exit the experience and return to the Liminal App. This is handled automatically by the Liminal SDK. Your Experience should therefore not attempt to respond to VRButton.Back.
  • The Liminal App and Liminal SDK support all input devices commonly in use across the supported VR platforms, including GearVR headsets that don't have a separate handheld controller. Your experience should be designed to work well for users with and without a handheld controller.
  • Not all controllers feature all of the input methods available through the Liminal SDK. Your experience should be designed to work well using just the buttons shared by all input devices. These are:
  • Other VRButton values such as VRButton.Trigger and VRButton.Touch can be used for non-essential functionality.

VRAvatar

Be careful when using the VRAvatar, as moving the incorrect components can result in the components losing their synchronization with one another.

Musts

  • Head rotation must be (0,0,0)
  • Eyes rotation and position must be (0,0,0)

Moving Player

  • To move the player, move VRAvatar

Adjust Height

  • To adjust the height of the player, move the VRAvatar or the Head (Y-Axis only)

Player-Facing Direction

  • Never adjust the Head rotation. Instead, adjust the VRAvatar rotation to alter the player's facing direction. This is due to the controller needing to also face the same direction as the player.

Ending Your Experience

  • To end your Experience
    1. Add using Liminal.SDK.Core;
    2. Then call ExperienceApp.End(); to end your Experience

Liminal ScreenFader

  • We highly encourage all users to have some form of screen transition for the end of their Experience.
  • Liminal supplies a screen fader with the Liminal SDK. This can be easily called from within your scripts.
  • To fade out at the end of your Experience:
    1. Add using Liminal.Core.Fader;

    2. Then call-

      var fader = ScreenFader.Instance;

      fader.FadeTo(Color fadeColor, float fadeDuration);

Avoid

Tags & Layers

  • Do not use tags unless they are assigned at runtime.
  • It is not recommended to rely on layers, as layers other than the deault ones are not carried through in a limapp and will returns null references. If you use layers, make sure to refer to their number and not their string name.

Unsupported Plugins

  • Plugins can be used as normal, but imported scripts must comply with these requirements in the same way as your own scripts.
  • When choosing whether to use a plugin, review its code as well as its terms and conditions carefully.

Licensing

  • We discourage using licensed plugins.

Known Incompatibility

  • Curvy
  • Postprocessing

[Serializable] Classes

  • These classes need to have a constructor without an argument if they use constructors.
  • Data may be lost during instantiation if the object is not in the scene.
  • [Serializable] classes that reference a scriptable object need the scriptable object to have the [PreferBinarySerialization] attribute

Methods

Unsupported

  • Do not use a method with a default parameter that references UnityEngine
    • e.g. void MyMethod(Space space = Space.Self);

Supported

  • Methods without default parameters can reference UnityEngine types as normal
    • e.g. void MyMethod(Space space);

Static Variables

  • These will be initialised the first time the Experience is loaded, but not necessarily before each time it is run.
  • If the Experience depends on static variables, ensure these are correctly initialized.
    • For example, a listener for the ExperienceApp.Initialize event

Ownership Rights

You must own the rights to all the content within your submitted Experience or they must comply with the conditions of the original content owner.

Some things to consider. Are you using…

  • Copyrighted music
  • Logos or direct references to brands
  • 3D models and assets must comply with re-use for commercial purpose

Recommendations

Project Settings

We recommend for you to use the same Project Settings as our platform during internal testing to best replicate the final published limapp. Not doing so may result in performance or visual differences when the limapp is published.

Project Settings Image

Alternatively, you can import out Project Settings and save some time.

Project Settings Files

Optimization

Everything You Need to Know to Develop for Oculus Go by Oculus (20th April 2018)

Squeezing Performance out of your Unity Gear VR Game by Oculus (12th May 2015))

Unity: Android Optimisation Guide by IronEqual (18th August 2017)