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.

77 lines
1.7 KiB

  1. namespace Oculus.Platform
  2. {
  3. // This only exists for the Unity Editor
  4. public sealed class StandalonePlatformSettings
  5. {
  6. #if UNITY_EDITOR
  7. private static string _OculusPlatformTestUserPassword = "";
  8. private static void ClearOldStoredPassword()
  9. {
  10. // Ensure that we are not storing the old passwords anywhere on the machine
  11. if (UnityEditor.EditorPrefs.HasKey("OculusStandaloneUserPassword"))
  12. {
  13. UnityEditor.EditorPrefs.SetString("OculusStandaloneUserPassword", "0000");
  14. UnityEditor.EditorPrefs.DeleteKey("OculusStandaloneUserPassword");
  15. }
  16. }
  17. #endif
  18. public static string OculusPlatformTestUserEmail
  19. {
  20. get
  21. {
  22. #if UNITY_EDITOR
  23. return UnityEditor.EditorPrefs.GetString("OculusStandaloneUserEmail");
  24. #else
  25. return string.Empty;
  26. #endif
  27. }
  28. set
  29. {
  30. #if UNITY_EDITOR
  31. UnityEditor.EditorPrefs.SetString("OculusStandaloneUserEmail", value);
  32. #endif
  33. }
  34. }
  35. public static string OculusPlatformTestUserPassword
  36. {
  37. get
  38. {
  39. #if UNITY_EDITOR
  40. ClearOldStoredPassword();
  41. return _OculusPlatformTestUserPassword;
  42. #else
  43. return string.Empty;
  44. #endif
  45. }
  46. set
  47. {
  48. #if UNITY_EDITOR
  49. ClearOldStoredPassword();
  50. _OculusPlatformTestUserPassword = value;
  51. #endif
  52. }
  53. }
  54. public static string OculusPlatformTestUserAccessToken
  55. {
  56. get
  57. {
  58. #if UNITY_EDITOR
  59. return UnityEditor.EditorPrefs.GetString("OculusStandaloneUserAccessToken");
  60. #else
  61. return string.Empty;
  62. #endif
  63. }
  64. set
  65. {
  66. #if UNITY_EDITOR
  67. UnityEditor.EditorPrefs.SetString("OculusStandaloneUserAccessToken", value);
  68. #endif
  69. }
  70. }
  71. }
  72. }