This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Commit 3082e56
committed
Providing a quick VR/normal toggle key.
First notice that the keyboard event must be handled in the JS side
since requesting the VR presentation is user-gated and only a
synchronous call from a user gesture can start the presentationñ.
The code in the C# behaviour compiles conditionally and it's only
included if not targeting WebGL. This is because of Unity code for
controlling the keyboard interferes somehow* with the code handling the
input events in the JS.
(*) When interfering, it resulted in the game not entering VR.1 parent fe3b61e commit 3082e56
File tree
4 files changed
+51
-12
lines changed- Assets
- WebGLTemplates/WebVR
- WebVR
- Plugins/WebGL
- Prefabs
- Scripts
4 files changed
+51
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
320 | 332 | | |
321 | 333 | | |
322 | 334 | | |
323 | 335 | | |
324 | 336 | | |
325 | 337 | | |
326 | 338 | | |
| 339 | + | |
327 | 340 | | |
328 | 341 | | |
329 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
43 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
143 | 151 | | |
144 | 152 | | |
145 | 153 | | |
146 | | - | |
147 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
148 | 158 | | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| 206 | + | |
195 | 207 | | |
196 | 208 | | |
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
200 | 221 | | |
201 | 222 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
205 | 226 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
209 | 230 | | |
210 | 231 | | |
211 | 232 | | |
| |||
0 commit comments