DeviceInfo.cs 817 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. namespace Rokid.UXR.Config
  4. {
  5. public class DeviceInfos
  6. {
  7. private static List<DeviceInfo> info;
  8. public static List<DeviceInfo> GetInfos()
  9. {
  10. if (info == null)
  11. {
  12. info = Newtonsoft.Json.JsonConvert.DeserializeObject<List<DeviceInfo>>(Resources.Load<TextAsset>("Configs/DeviceInfo").ToString());
  13. }
  14. return info;
  15. }
  16. }
  17. [System.Serializable]
  18. public class DeviceInfo
  19. {
  20. /// 设备编号
  21. public int DeviceId;
  22. /// 设备名称
  23. public string DeviceName;
  24. /// 设备PID
  25. public int PID;
  26. /// FOV
  27. public float CameraFov;
  28. /// 是否有相机Camera
  29. public int HaveCamera;
  30. }
  31. }