버그 수정

This commit is contained in:
geondo55
2025-05-28 09:52:09 +09:00
parent aa99e41b2e
commit 9c607e3e75
2 changed files with 12 additions and 5 deletions

View File

@@ -61,7 +61,9 @@ namespace Studio.RuntimeGizmo
workGizmoId = GizmoId.None;
}
public void SetWorkGizmoId(GizmoId gizmoId)
{
{
if (ManagerHub.instance.Get<RunManager>().curState == RunManager.EState.Run)
return;
objectMoveGizmo.Gizmo.SetEnabled(false);
objectRotationGizmo.Gizmo.SetEnabled(false);
objectScaleGizmo.Gizmo.SetEnabled(false);
@@ -102,6 +104,8 @@ namespace Studio.RuntimeGizmo
}
public void SetGizmoTargetObjects(List<GameObject> objects)
{
if (ManagerHub.instance.Get<RunManager>().curState == RunManager.EState.Run)
return;
selectedObjects.Clear();
selectedObjects.AddRange(objects);
objectMoveGizmo.SetTargetObjects(selectedObjects);
@@ -111,6 +115,10 @@ namespace Studio.RuntimeGizmo
workGizmo.Gizmo.SetEnabled(selectedObjects.Count != 0);
}
public void ResetGizmo()
{
SetGizmoTargetObjects(new List<GameObject>());
}
private void OnGizmoDragBegin(Gizmo gizmo, int t)
{
onTransformBegin?.Invoke();

View File

@@ -27,16 +27,15 @@ namespace Studio.Manage
{
StudioService.instance.Init();
onRun += Dynamic.M.AGVManager.instance.OnPlayStart;
onRun += ManagerHub.instance.Get<RenderObjectHandler>().rtgController.InitGizmo;
onRun += ManagerHub.instance.Get<CustomAssetConnector>().OnDeselectAll;
onStop += StudioService.instance.DisConnectMQTT;
onStop += ManagerHub.instance.Get<CustomAssetConnector>().OnDeselectAll;
}
public void ChangeState()
{
ManagerHub.instance.Get<RenderObjectHandler>().rtgController.ResetGizmo();
ManagerHub.instance.Get<CustomAssetConnector>().OnDeselectAll();
curState = curState == EState.Stop ? EState.Run : EState.Stop;
Debug.Log("curState " + curState);
switch (curState)
{
case EState.Run: