BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / Platform / Scripts / AndroidPlatform.cs

AndroidPlatform.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
AndroidPlatform.cs 807 B Download Raw
1namespace Oculus.Platform
2{
3 using UnityEngine;
4 using System.Collections;
5 using System;
6
7 public class AndroidPlatform
8 {
9 public bool Initialize(string appId)
10 {
11#if UNITY_ANDROID
12 if(String.IsNullOrEmpty(appId))
13 {
14 throw new UnityException("AppID must not be null or empty");
15 }
16 return CAPI.ovr_UnityInitWrapper(appId);
17#else
18 return false;
19#endif
20 }
21
22 public Request<Models.PlatformInitialize> AsyncInitialize(string appId)
23 {
24#if UNITY_ANDROID
25 if(String.IsNullOrEmpty(appId))
26 {
27 throw new UnityException("AppID must not be null or empty");
28 }
29 return new Request<Models.PlatformInitialize>(CAPI.ovr_UnityInitWrapperAsynchronous(appId));
30#else
31 return new Request<Models.PlatformInitialize>(0);
32#endif
33 }
34 }
35}