Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
807 B

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