Skip to main content

Unity Quickstart Guide

Package Integration

  1. To include OmniStream in your Unity project Open the Package Manager (Window->Package Manager).

    Launch package manager

  2. In the Package Manager, select "Add package from git URL..." and paste in the git URL https://github.com/ZeroLight-Ltd/OmniStream-Unity-Package.git.

    Add package from URL

  3. Once the package has installed open your project's main Scene, open the ZeroLight menu and click Add OmniStream to scene.

  4. You'll see the ZLCloudPluginModule GameObject has been added to the root of your scene.

  5. For a basic integration you're now ready to build and upload your application.

Notes
  • OmniStream considers an application ready to stream as soon as the ZLCloudPluginModule GameObject becomes active in the scene. Placing it in your main scene works well for most projects, but if you have an involved start process another approach might make sense. It is possible to put the ZLCloudPluginModule GameObject in it's own scene and load that once everything else is ready, or have it disabled by default and enable it once loading has finished.

  • The ZLCloudPluginModule GameObject automatically gets added to DontDestroyOnLoad so it will persist between Scene changes. If you use Scene reloads as a method of resetting state between connections, then ensure that the GameObjects linked in any events are also added to DontDestroyOnLoad, otherwise the links will be broken on Scene reload.

  • The ZLCloudPluginModule GameObject should be left at the root of your scene, and not made a child of another GameObject.

Build and Upload

  1. Select Build and Upload from the ZeroLight menu.
  2. Log in to the ZeroLight Portal (if you do not have credentials, please contact your account manager). Portal login
  3. First build only - pick the Portal asset you wish to associate your Unity project with. Asset picker
  4. The application will build and zip the results.
  5. Wait for the result to be uploaded.
  6. Once a build has been uploaded go to Portal to deploy it to your Render Service.

Next Steps

Now you've deployed your first application you're ready to test connecting from the Test page, send somebody a link/iframe into your website using the Viewer App or do a native integration into your website.

Some more advanced Unity topics to investigate:

  • Allowing additional input keys for use in OmniStream.
  • Enabling audio for all scenes.
  • Hooking into OmniStream events
  • Setting up CI/CD for your project
  • For further information about the technical benefits of streaming your Unity project with OmniStream, please see here.