XDKConfigs.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using UnityEngine;
  3. namespace Seengene.XDKUnityPluginCloud {
  4. public delegate void OnDebugModeChangeHandler();
  5. public class XDKConfigs {
  6. public static event OnDebugModeChangeHandler OnDebugModeChange;
  7. /// <summary>
  8. /// 云定位获取SessionID URL
  9. /// </summary>
  10. public static string AuthorizationAPIAddress = "";
  11. /// <summary>
  12. /// 云定位上传图片及相机位姿URL
  13. /// </summary>
  14. public static string RelocationAPIAddress = "";
  15. /// <summary>
  16. /// 云定位地图ID
  17. /// </summary>
  18. public static string MapId = "";
  19. /// <summary>
  20. /// 是否开启算法重定位
  21. /// </summary>
  22. public static bool IfRelocationOn = true;
  23. /// <summary>
  24. /// 是否开启打印日志
  25. /// </summary>
  26. public static bool IfLogOn = true;
  27. /// <summary>
  28. /// 是否Debug模式
  29. /// </summary>
  30. private static bool m_IfDebugOn = true;
  31. public static bool IfDebugOn {
  32. get { return m_IfDebugOn; }
  33. set {
  34. m_IfDebugOn = value;
  35. OnDebugModeChange?.Invoke();
  36. }
  37. }
  38. /// <summary>
  39. /// 是否保存图片到本地
  40. /// </summary>
  41. public static bool IfSaveImages = false;
  42. public static void SetDefault() {
  43. AuthorizationAPIAddress = "";
  44. RelocationAPIAddress = "";
  45. MapId = "";
  46. IfRelocationOn = true;
  47. IfLogOn = true;
  48. IfDebugOn = false;
  49. IfSaveImages = false;
  50. }
  51. }
  52. }