request 시 try catch 추가 제이슨 파싱 실패시 에러팝업 생성

오브젝트 삭제시 기즈모 삭제
This commit is contained in:
2025-07-17 15:07:36 +09:00
parent cf5db448ff
commit a79f80ce1f
2 changed files with 10 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ public class RTGController : UnitySingleton<RTGController>
if (Input.GetKeyDown(KeyCode.Delete)&& !simulationUI.isplaying)
{
Destroy(selectedObjects[0]);
ClearGizmoTargetObjects();
}
}
public void SetWorkGizmoId(GizmoId gizmoId)

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
using System.Collections;
using Octopus.Simulator.Networks;
using System.Collections.Generic;
@@ -86,7 +86,14 @@ namespace UVC.Networks
if ( json != null)
{
data = JsonConvert.SerializeObject(json);
try
{
data = JsonConvert.SerializeObject(json);
}
catch (Exception e)
{
AlertManager.I.ShowAlert("Error",e.Message).Forget();
}
}
RequestAsync<T>(requestURL, type, data)