API_SDKGlobalConfiguration.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace SC.XR.Unity
  5. {
  6. public class API_SDKGlobalConfiguration
  7. {
  8. public static bool HasKey(string section, string key)
  9. {
  10. return Module_SDKGlobalConfiguration.getInstance.HasKey(section, key);
  11. }
  12. public static int GetInt(string section, string key, int defaultVal)
  13. {
  14. return Module_SDKGlobalConfiguration.getInstance.GetInt(section, key, defaultVal);
  15. }
  16. public static bool GetBool(string section, string key, int defaultVal)
  17. {
  18. return Module_SDKGlobalConfiguration.getInstance.GetBool(section, key, defaultVal);
  19. }
  20. public static string GetString(string section, string key, string defaultVal)
  21. {
  22. return Module_SDKGlobalConfiguration.getInstance.GetString(section, key, defaultVal);
  23. }
  24. public static float GetFloat(string section, string key, float defaultVal)
  25. {
  26. return Module_SDKGlobalConfiguration.getInstance.GetFloat(section, key, defaultVal);
  27. }
  28. public static void SetConfiguration(string sec, string key, string val)
  29. {
  30. Module_SDKGlobalConfiguration.getInstance.SetString(sec, key, val);
  31. }
  32. public static void SaveAllConfigToFile() {
  33. Module_SDKGlobalConfiguration.getInstance.SaveAllConfigToFile();
  34. }
  35. }
  36. }