You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: OSVR-Unity/README.md
+117-1
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,124 @@ Examples for buttons and analog triggers are included in the `minigame` scene.
31
31
32
32
Paths for these callbacks that provide useful information can be found in the main OSVR-Core documentation on the "Writing a client application" page.
33
33
34
+
### Rendering
35
+
The optimal path is to use OSVR-Unity with a direct-mode enabled config file. **OSVRDemo.unity** and **OSVRDemo2.unity** are simple scenes which demonstrate how to use the OSVR prefabs without harnessing Unity's built-in VR SDK.
36
+
**OSVR-UnityVR-Demo.unity** is a scene with a prefab which uses Unity's native VR support and benefits from optimizations like single-pass rendering.
37
+
38
+
If a RenderManager configuration is not provided, the plugin will fall back to a more primitive rendering path.
39
+
34
40
### Other interaction
35
41
Any other interaction with the OSVR framework should go directly through the Managed-OSVR (.NET) wrapper without any Unity-specific adaptations. See that source for examples of button and analog callbacks, as well as display parameter access (ideally used to set up the display properly). In terms of API, the Managed-OSVR API is effectively a direct translation of the C++ wrappers of OSVR `ClientKit`, so please see the main OSVR-Core client documentation for more information.
36
42
37
43
### Execution
38
-
A standalone player built for Windows may end up needing the `-adapter N` argument, where `N` is a Direct3D display adapter, to put the rendered output on the HMD display.
44
+
A standalone player built for Windows may end up needing the `-adapter N` argument, where `N` is a Direct3D display adapter, to put the rendered output on the HMD display. This is usually not necessary.
45
+
46
+
## Building for Android
47
+
The libraries required for building for Android are included in the OSVR-Unity source. These will eventually be migrated out of the OSVR-Unity repo when the CI build is updated and will copy them for us when the unitypackage is created.
48
+
49
+
### Server Config File
50
+
Copy a file named **osvr_server_config.json** to _/sdcard/osvr/_.
51
+
The contents of osvr_server_config.json should match your display. Here is a server config for a Samsung Galaxy S6:
52
+
<details>
53
+
<summary>Click to expand osvr_server_config.json</summary>
The current default path relies on the server autostart feature. Check the "server autotostart" flag on the ClientKit prefab for Android builds. See the OSVR-UnityVR-Android-Demo.unity scene. If the server fails to start, you'll see a black screen, have no tracking, or the application could crash.
147
+
148
+
### Disable Mirror Mode
149
+
If you target is a phone display and not an HMD, you'll want to disable the OsvrMirrorDisplay component in your scene.
150
+
151
+
### Player Settings
152
+
Note that you'll need Write Access to the External SD Card, and Internet Access set to Required. The following player settings have been tested to work with Unity 2017.1.0f3 and Unity 5.6.1f1:
153
+
154
+

Copy file name to clipboardExpand all lines: README.md
+1-3
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,7 @@ The Unity integration is based on the [Managed-OSVR][] .NET binding for OSVR, wh
15
15
## OSVR-RenderManager Support
16
16
OSVR-Unity uses the OSVR-RenderManager library for direct-mode rendering, lens correction, timewarp, etc.. [OSVR-RenderManager](https://github.com/sensics/OSVR-RenderManager) is a separate, Unity-independent project that is used in other applications/engines. The project which bridges between OSVR-Unity and OSVR-RenderManger is [OSVR-Unity-Rendering](https://github.com/OSVR/OSVR-Unity-Rendering), which uses the Unity low-level [native plugin interface](https://docs.unity3d.com/Manual/NativePluginInterface.html).
17
17
18
-
These libraries are copied over to the Plugins directory in our CI build, and are not included in the source.
19
-
20
-
## Android
18
+
These libraries are copied over to the Plugins directory in our CI build, and are not included in the source.
21
19
22
20
## OSVR Unity Integration
23
21
[Step-by-step getting started guide](https://github.com/OSVR/OSVR-Unity/blob/master/GettingStarted.md)
0 commit comments