diff --git a/Assets/Scripts/RTGController.cs b/Assets/Scripts/RTGController.cs index 10d75c42..49c20e5b 100644 --- a/Assets/Scripts/RTGController.cs +++ b/Assets/Scripts/RTGController.cs @@ -65,6 +65,7 @@ public class RTGController : UnitySingleton if (Input.GetKeyDown(KeyCode.Delete)&& !simulationUI.isplaying) { Destroy(selectedObjects[0]); + ClearGizmoTargetObjects(); } } public void SetWorkGizmoId(GizmoId gizmoId) diff --git a/Assets/WorkSpace/LH/Web/WebManager.cs b/Assets/WorkSpace/LH/Web/WebManager.cs index 3c9c2dd2..d232d98f 100644 --- a/Assets/WorkSpace/LH/Web/WebManager.cs +++ b/Assets/WorkSpace/LH/Web/WebManager.cs @@ -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(requestURL, type, data)