Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit fd730cb

Browse files
authored
Merge pull request #319 from caseyyee/getting-started-doc
Getting started options and Input Manager settings.
2 parents 1853dbf + 88097a4 commit fd730cb

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

docs/controllers.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ To create a new `WebVRControllerInputMap`, use `Asset > Create > WebVRController
5151

5252
# Configure Unity Input Manager
5353

54-
To get up and running using pre-configured Input Manager settings, copy `Project Settings/InputManager.asset` from this repo into your own project.
54+
To get up and running using pre-configured Input Manager settings, follow [Step #5, Add Input Manager Settings to your Project](project-setup.md#5-add-input-manager-settings-to-your-project) in the [Setting up a Unity project for WebVR](./project-setup.md) guide.
5555

56-
You can also choose to manually configure the Input Manager by using
57-
`Edit > Project Settings > Input`
56+
You can also choose to manually configure the Input Manager by using `Edit > Project Settings > Input`
5857

59-
Below is an example of a Unity Input Manager entries that map to `WebVRControllerInputMap` configuration as shown above.
58+
Below is an example of Unity Input Manager _input axes_ that correspond to the _Unity Input Name_ in the `WebVRControllerInputMap` as [shown above](#configuring-a-webvrcontrollerinputmap-asset).
6059

6160
![Unity Input Manager configuration](images/unity-input-manager.png)
6261

docs/project-setup.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Setting up a Unity project for WebVR
22

3-
In this tutorial, we go through the steps of a basic project setup using the WebVR Assets.
3+
**There are two ways to start a WebVR enabled project using Unity.**
4+
5+
1. **[Download the example project](https://github.com/mozilla/unity-webvr-export/archive/master.zip).**
6+
7+
This is the simplest option, to do this, [download the project](https://github.com/mozilla/unity-webvr-export/archive/master.zip) and open in Unity. You can follow steps from [step #7](#7-build-your-project-to-webvr) onwards to build the project to WebVR.
8+
9+
2. **[Start by Creating a new Unity 3D Project](#1-create-a-new-unity-3d-project).**
10+
11+
In this tutorial, we cover option 2, starting from new, stepping through each step from creating a new Unity project, adding the WebVR Assets, then building to WebVR.
412

513
## 1. Create a new Unity 3D project.
614

@@ -14,7 +22,13 @@ Open the menus: `File > Build Settings`
1422

1523
![WebGL Platform](./images/webgl-platform.png)
1624

17-
## 3. Download the assets from the Unity Asset store.
25+
## 3. Enable Virtual Reality support in Unity.
26+
27+
See [In-editor VR playback for rapid testing](./xr-testing.md) for full steps.
28+
29+
![Enable VR Support in Unity](images/unity-xr-settings.gif)
30+
31+
## 4. Download the assets from the Unity Asset store.
1832

1933
**[Unity Asset Store page](https://assetstore.unity.com/packages/templates/systems/webvr-assets-109152).**
2034

@@ -24,7 +38,7 @@ Alternatively, download and install the [`WebVR-Assets.unitypackage`](https://gi
2438

2539
![WebVR package](./images/import-package.png)
2640

27-
## 4. Add the WebVR prefab to your scene.
41+
## 5. Add the WebVR prefab to your scene.
2842

2943
Disable the standard default camera, so that it does not interfere with the cameras used in the WebVR prefab.
3044

@@ -38,11 +52,17 @@ Add the `WebVRCameraSet` prefab (`Assets > WebVR > Prefabs > WebVRCameraSet.pref
3852

3953
The prefab contains hand controllers, VR Camera setup and other components needed for your game to work with WebVR.
4054

41-
## 5. You're Unity project is setup. Play to see the result!
55+
## 6. Add Input Manager settings to your project.
56+
57+
Copy [`InputManager.asset`](https://github.com/mozilla/unity-webvr-export/raw/master/ProjectSettings/InputManager.asset) into your Project `/ProjectSettings` folder. This will add pre-configured Unity Input Manager input axes needed for controllers to work.
58+
59+
See [Controllers and Input System](./controllers.md) for more details about how this works.
60+
61+
## 7. You're Unity project is setup. Play to see the result!
4262

4363
![Import prefab](./images/editor-play.gif)
4464

45-
## 6. Build your project to WebVR
65+
## 8. Build your project to WebVR
4666

4767
### Select the WebVR template from player settings.
4868

0 commit comments

Comments
 (0)