BlueTest.cs 1005 B

12345678910111213141516171819202122232425262728
  1. using System.Collections.Generic;
  2. using Blue;
  3. using Newtonsoft.Json;
  4. using UnityEngine;
  5. public class BlueTest : AbstractController
  6. {
  7. void Update()
  8. {
  9. if(Input.GetKeyDown(KeyCode.L))
  10. {
  11. List<ScenePosRotInfo> list = new List<ScenePosRotInfo>();
  12. ScenePosRotInfo pos = new ScenePosRotInfo();
  13. ScenePosRotInfo rot = new ScenePosRotInfo();
  14. pos.x = 1;pos.y = 1;pos.z = 1;
  15. rot.x = 2;rot.y = 2;;rot.z = 2;
  16. list.Add(pos);list.Add(rot);
  17. string jsonString = JsonConvert.SerializeObject(list);
  18. string url = "https://api-fat1.ghz-tech.com/mr-navigator/v1/project/position/396";
  19. //HttpTool.Instance.UploadScenePosRot(url,jsonString,CallBack);
  20. //this.SendCommand(new UploadCommand(url, HttpTool.Instance.RequestHeader, HttpTool.Instance.Token, jsonString));
  21. }
  22. }
  23. private void CallBack(string e)
  24. {
  25. Debug.LogError(e);
  26. }
  27. }