From 244727391f20987723a10f4af551fefc6dbe71a8 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 8 Jul 2025 12:02:03 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EC=98=A4=EB=B8=8C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=8A=A4=EB=83=85=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExternalAssets/Gizmo/RTGController.cs | 3 +- .../Drag/GizmoObjectVertexSnapDrag3D.cs | 30 ++------ .../Extensions/GameObjectEx.cs | 19 +++++ .../Studio/AssetTool/RenderObjectHandler.cs | 77 ------------------- 4 files changed, 26 insertions(+), 103 deletions(-) diff --git a/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs b/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs index 537c7f76..935a016f 100644 --- a/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs +++ b/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs @@ -37,7 +37,7 @@ namespace Studio.RuntimeGizmo objectMoveGizmo.Gizmo.SetEnabled(false); objectMoveGizmo.Gizmo.MoveGizmo.SetSnapEnabled(false); - objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapEnabled(false); + objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapEnabled(true); objectRotationGizmo.Gizmo.SetEnabled(false); objectScaleGizmo.Gizmo.SetEnabled(false); objectUniversalGizmo.Gizmo.SetEnabled(false); @@ -109,6 +109,7 @@ namespace Studio.RuntimeGizmo selectedObjects.Clear(); selectedObjects.AddRange(objects); objectMoveGizmo.SetTargetObjects(selectedObjects); + objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapTargetObjects(selectedObjects); objectRotationGizmo.SetTargetObjects(selectedObjects); objectScaleGizmo.SetTargetObjects(selectedObjects); objectUniversalGizmo.SetTargetObjects(selectedObjects); diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs index 5c2ac21d..5ab2c806 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs @@ -106,14 +106,13 @@ namespace RTG bool foundPoint = false; foreach (var srcObject in gameObjects) { - Mesh mesh = srcObject.GetMesh(); - if (mesh != null) + foreach (var (mesh, transform) in srcObject.GetAllMeshWithTransform()) { MeshVertexChunkCollection meshVChunkCollection = MeshVertexChunkCollectionDb.Get[mesh]; if (meshVChunkCollection == null) continue; - Matrix4x4 worldMtx = srcObject.transform.localToWorldMatrix; + Matrix4x4 worldMtx = transform.localToWorldMatrix; List testChunks = meshVChunkCollection.GetWorldChunksHoveredByPoint(inputDeviceScreenPt, worldMtx, focusCamera); if (testChunks.Count == 0) { @@ -126,7 +125,9 @@ namespace RTG { Vector3 worldVert = chunk.GetWorldVertClosestToScreenPt(inputDeviceScreenPt, worldMtx, focusCamera); Vector2 screenVert = focusCamera.WorldToScreenPoint(worldVert); - float distSqr = (inputDeviceScreenPt - screenVert).sqrMagnitude; + Vector2 screenVert2D = new Vector2(screenVert.x, screenVert.y); + float distSqr = (inputDeviceScreenPt - screenVert2D).sqrMagnitude; + if (distSqr < minDistSqr) { minDistSqr = distSqr; @@ -135,27 +136,6 @@ namespace RTG } } } - else - { - OBB spriteWorldOBB = ObjectBounds.CalcSpriteWorldOBB(srcObject); - if (spriteWorldOBB.IsValid) - { - List obbPoints = spriteWorldOBB.GetCenterAndCornerPoints(); - List screenPoints = focusCamera.ConvertWorldToScreenPoints(obbPoints); - int closestPtIndex = Vector2Ex.GetPointClosestToPoint(screenPoints, inputDeviceScreenPt); - if (closestPtIndex >= 0) - { - Vector2 closestPt = screenPoints[closestPtIndex]; - float distSqr = (inputDeviceScreenPt - closestPt).sqrMagnitude; - if (distSqr < minDistSqr) - { - minDistSqr = distSqr; - point = obbPoints[closestPtIndex]; - foundPoint = true; - } - } - } - } } return foundPoint; diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Extensions/GameObjectEx.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Extensions/GameObjectEx.cs index 2e979ca9..35ddf3d2 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Extensions/GameObjectEx.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Extensions/GameObjectEx.cs @@ -215,6 +215,25 @@ namespace RTG return null; } + public static List<(Mesh mesh, Transform transform)> GetAllMeshWithTransform(this GameObject root) + { + var result = new List<(Mesh, Transform)>(); + + foreach (var mf in root.GetComponentsInChildren(true)) + { + if (mf.sharedMesh != null) + result.Add((mf.sharedMesh, mf.transform)); + } + + foreach (var smr in root.GetComponentsInChildren(true)) + { + if (smr.sharedMesh != null) + result.Add((smr.sharedMesh, smr.transform)); + } + + return result; + } + public static Renderer GetMeshRenderer(this GameObject gameObject) { MeshRenderer meshRenderer = gameObject.GetComponent(); diff --git a/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs b/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs index 05869bb3..3ba8c85c 100644 --- a/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs +++ b/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs @@ -318,82 +318,6 @@ namespace Studio.AssetTool } CanvasManager.instance.GetCanvas().panel_dynamicobjectinfo.OnTransformChanged(objectsToAlign.Select(renderObject => renderObject.gameObject).ToList()); } - public void VertexSnap() - { - if (selectedRenderObjects.Count != 1) - { - return; - } - //가장 가까운 오브젝트에 붙여준다. - //Transform.position이 가깝다고 오브젝트 사이 기리가 꼭 가장 가까운 것은 아니기 때문에 - //오버랩 박스에 충돌되는 모든 오브젝트의 버텍스로 KDTree를 구성해 볼까 하다가 관두었다. - float minDist = float.MaxValue; - CustomAssetRenderObject fromObject = selectedRenderObjects[0]; - CustomAssetRenderObject toObject = null; - Bounds fromBounds = fromObject.GetBounds(); - Collider[] colliders = Physics.OverlapBox(fromBounds.center, fromBounds.size * 2.0f); - foreach (Collider collider in colliders) - { - if (collider.gameObject == fromObject.gameObject) continue; - CustomAssetRenderObject otherObject = collider.gameObject.GetComponent(); - if (otherObject != null) - { - float dist = Vector3.Magnitude(fromObject.transform.position - otherObject.transform.position); - if (dist < minDist) - { - minDist = dist; - toObject = otherObject; - } - } - } - if (toObject != null) - { - //선택된 오브젝트의 ConvexHull 버텍스 점을 계산해준다. - //이는 iteration하는 버텍스 수를 줄이기 위해 해주며, - //만약 선택된 오브젝트도 TDTree로 Nearest 포인트 탐지할 경우 toObject의 센터에 가장 가까운 포인트만 탐지되기 때문에 가장 가까운 버텍스 점이 골라지지 않는 경우가 있다. - List verts = new List(); - List tris = new List(); - List normals = new List(); - convexHullCalculator.GenerateHull(fromObject.GetRenderObjectVertices(), false, ref verts, ref tris, ref normals); - KDTree toTree = toObject.GetVertexPointKDTree(); - Vector3 nearestPoint = Vector3.zero; - Vector3 snapPoint = Vector3.zero; - float minDistance = float.MaxValue; - for (int i = 0; i < verts.Count; i++) - { - Vector3 ptNearest = verts[i]; - Vector3 ptSnap = toTree.FindNearest(ptNearest); - float tempDist = Vector3.Magnitude(ptSnap - ptNearest); - if (tempDist < minDistance) - { - minDistance = tempDist; - nearestPoint = ptNearest; - snapPoint = ptSnap; - } - } - //Vector3 direction = snapPoint - nearestPoint; - //fromObject.transform.position += direction; - List dir = new List() { snapPoint - nearestPoint }; - if (dir[0].magnitude < 0.5f) - { - fromObject.transform.position += dir[0]; - } - else - { - ActionCommand command = new ActionCommand( - () => - { - fromObject.transform.position += dir[0]; - }, - () => - { - fromObject.transform.position -= dir[0]; - }); - CommandInvoker.instance.Invoke(command); - } - } - } - InputHandler myHandler; public void StatusEnterEvent() @@ -422,7 +346,6 @@ namespace Studio.AssetTool downKeyActions.Add(KeyCode.E, () => SetGizmoChangedCommand(new ActivateScaleGizmoCommand())); downKeyActions.Add(KeyCode.R, () => SetGizmoChangedCommand(new ResetGizmoCommand())); downKeyActions.Add(KeyCode.Delete, () => CommandInvoker.instance.Invoke(new RemoveSelectObjectCommand())); - getKeyActions.Add(KeyCode.V, VertexSnap); var shortcutTable = new Dictionary>(); #if UNITY_EDITOR -- 2.48.1.windows.1 From 1189be18016fcb507c8e614935cd7267cc2244f4 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:09:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EC=94=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/0.30.0.unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scenes/0.30.0.unity b/Assets/Scenes/0.30.0.unity index 048e6da8..eddeffc2 100644 --- a/Assets/Scenes/0.30.0.unity +++ b/Assets/Scenes/0.30.0.unity @@ -5663,7 +5663,7 @@ MonoBehaviour: _staticData: CanHaveMouseButtons: 0 _enableVertexSnapping: - _isEnabled: 0 + _isEnabled: 1 _key: 118 _lCtrl: 0 _lCmd: 0 -- 2.48.1.windows.1 From bd6718bee71af208515cf538d464ba2346f2f96d Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:52:00 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EC=98=A4=EB=B8=8C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=8A=A4=EB=83=85=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExternalAssets/Gizmo/RTGController.cs | 19 +++- .../Drag/GizmoObjectVertexSnapDrag3D.cs | 92 +++++++++++-------- .../Scene/Grid/XZGridCell.cs | 6 +- .../AssetTool/CustomAssetRenderObject.cs | 1 + 4 files changed, 76 insertions(+), 42 deletions(-) diff --git a/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs b/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs index 935a016f..ae055e67 100644 --- a/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs +++ b/Assets/Scripts/ExternalAssets/Gizmo/RTGController.cs @@ -4,6 +4,7 @@ using UnityEngine; using Studio.Command; using Studio.Core; using Studio.Manage; +using Studio.AssetTool; namespace Studio.RuntimeGizmo { @@ -37,7 +38,7 @@ namespace Studio.RuntimeGizmo objectMoveGizmo.Gizmo.SetEnabled(false); objectMoveGizmo.Gizmo.MoveGizmo.SetSnapEnabled(false); - objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapEnabled(true); + objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapEnabled(false); objectRotationGizmo.Gizmo.SetEnabled(false); objectScaleGizmo.Gizmo.SetEnabled(false); objectUniversalGizmo.Gizmo.SetEnabled(false); @@ -109,12 +110,26 @@ namespace Studio.RuntimeGizmo selectedObjects.Clear(); selectedObjects.AddRange(objects); objectMoveGizmo.SetTargetObjects(selectedObjects); - objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapTargetObjects(selectedObjects); objectRotationGizmo.SetTargetObjects(selectedObjects); objectScaleGizmo.SetTargetObjects(selectedObjects); objectUniversalGizmo.SetTargetObjects(selectedObjects); workGizmo.Gizmo.SetEnabled(selectedObjects.Count != 0); + + List meshObjects = new List(); + + foreach (GameObject go in selectedObjects) + { + CustomAssetRenderObject assetObj = go.GetComponent(); + if (assetObj == null) continue; + MeshRenderer[] renderer = assetObj.RenderObject.GetComponentsInChildren(true); + foreach (var r in renderer) + { + meshObjects.Add(r.gameObject); + } + } + + objectMoveGizmo.Gizmo.MoveGizmo.SetVertexSnapTargetObjects(meshObjects); } public void ResetGizmo() { diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs index 5ab2c806..759fcb7e 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections.Generic; using System; +using System.Linq; namespace RTG { @@ -57,33 +58,37 @@ namespace RTG _destinationObjects.Clear(); } - List centersAndCorners = new List(); protected override void CalculateDragValues() { Camera focusCamera = RTFocusCamera.Get.TargetCamera; _relativeDragOffset = Vector3.zero; - if (_destinationObjects.Count != 0 && _settings.CanSnapToObjectVerts) { Vector3 worldDestPos; - if (GetWorldPointClosestToInputDevice(focusCamera, _destinationObjects, out worldDestPos)) - _relativeDragOffset = worldDestPos - _snapPivot; - - return; + if (GetWorldPointClosestToInputDevice(focusCamera, _destinationObjects, out worldDestPos)) _relativeDragOffset = worldDestPos - _snapPivot; } - - if (_settings.CanSnapToGrid) + else + if(_settings.CanSnapToGrid) { Ray ray = RTInputDevice.Get.Device.GetRay(focusCamera); XZGridRayHit gridHit = RTScene.Get.RaycastSceneGridIfVisible(ray); if (gridHit != null) { XZGridCell gridCell = RTSceneGrid.Get.CellFromWorldPoint(gridHit.HitPoint); - gridCell.GetCenterAndCorners(ref centersAndCorners); - + List centersAndCorners = gridCell.GetCenterAndCorners(); int closestPtIndex = Vector3Ex.GetPointClosestToPoint(centersAndCorners, gridHit.HitPoint); - if (closestPtIndex >= 0) - _relativeDragOffset = centersAndCorners[closestPtIndex] - _snapPivot; + if (closestPtIndex >= 0) _relativeDragOffset = centersAndCorners[closestPtIndex] - _snapPivot; + } + } + else + { + Ray ray = RTInputDevice.Get.Device.GetRay(focusCamera); + Plane dragPlane = new Plane(Vector3.up, _snapPivot); + + if (dragPlane.Raycast(ray, out float enter)) + { + Vector3 worldPoint = ray.GetPoint(enter); + _relativeDragOffset = worldPoint - _snapPivot; } } @@ -93,12 +98,10 @@ namespace RTG protected bool GetWorldPointClosestToInputDevice(Camera focusCamera, IEnumerable gameObjects, out Vector3 point) { + Debug.Log("enter " + gameObjects.Count()); point = Vector3.zero; - if (gameObjects == null) - return false; - - if (!RTInputDevice.Get.Device.HasPointer()) - return false; + if (gameObjects == null) return false; + if (!RTInputDevice.Get.Device.HasPointer()) return false; Vector2 inputDeviceScreenPt = RTInputDevice.Get.Device.GetPositionYAxisUp(); float minDistSqr = float.MaxValue; @@ -106,28 +109,25 @@ namespace RTG bool foundPoint = false; foreach (var srcObject in gameObjects) { - foreach (var (mesh, transform) in srcObject.GetAllMeshWithTransform()) + Mesh mesh = srcObject.GetMesh(); + if (mesh != null) { MeshVertexChunkCollection meshVChunkCollection = MeshVertexChunkCollectionDb.Get[mesh]; - if (meshVChunkCollection == null) - continue; + if (meshVChunkCollection == null) continue; - Matrix4x4 worldMtx = transform.localToWorldMatrix; + Matrix4x4 worldMtx = srcObject.transform.localToWorldMatrix; List testChunks = meshVChunkCollection.GetWorldChunksHoveredByPoint(inputDeviceScreenPt, worldMtx, focusCamera); if (testChunks.Count == 0) { MeshVertexChunk closestChunk = meshVChunkCollection.GetWorldVertChunkClosestToScreenPt(inputDeviceScreenPt, worldMtx, focusCamera); - if (closestChunk != null && closestChunk.VertexCount != 0) - testChunks.Add(closestChunk); + if (closestChunk != null && closestChunk.VertexCount != 0) testChunks.Add(closestChunk); } foreach (var chunk in testChunks) { Vector3 worldVert = chunk.GetWorldVertClosestToScreenPt(inputDeviceScreenPt, worldMtx, focusCamera); Vector2 screenVert = focusCamera.WorldToScreenPoint(worldVert); - Vector2 screenVert2D = new Vector2(screenVert.x, screenVert.y); - float distSqr = (inputDeviceScreenPt - screenVert2D).sqrMagnitude; - + float distSqr = (inputDeviceScreenPt - screenVert).sqrMagnitude; if (distSqr < minDistSqr) { minDistSqr = distSqr; @@ -136,6 +136,27 @@ namespace RTG } } } + else + { + OBB spriteWorldOBB = ObjectBounds.CalcSpriteWorldOBB(srcObject); + if (spriteWorldOBB.IsValid) + { + List obbPoints = spriteWorldOBB.GetCenterAndCornerPoints(); + List screenPoints = focusCamera.ConvertWorldToScreenPoints(obbPoints); + int closestPtIndex = Vector2Ex.GetPointClosestToPoint(screenPoints, inputDeviceScreenPt); + if (closestPtIndex >= 0) + { + Vector2 closestPt = screenPoints[closestPtIndex]; + float distSqr = (inputDeviceScreenPt - closestPt).sqrMagnitude; + if (distSqr < minDistSqr) + { + minDistSqr = distSqr; + point = obbPoints[closestPtIndex]; + foundPoint = true; + } + } + } + } } return foundPoint; @@ -152,9 +173,7 @@ namespace RTG _destinationObjects.Clear(); IInputDevice inputDevice = RTInputDevice.Get.Device; - if (!inputDevice.HasPointer()) - return; - + if (!inputDevice.HasPointer()) return; Vector2 inputDevicePos = inputDevice.GetPositionYAxisUp(); var boundsQConfig = new ObjectBounds.QueryConfig(); @@ -163,20 +182,17 @@ namespace RTG RTFocusCamera.Get.GetVisibleObjects(_visibleObjectBuffer); List targetObjects = new List(_targetObjects); - _visibleObjectBuffer - .RemoveAll(a => - targetObjects.Contains(a) || - !ObjectBounds.CalcScreenRect(a, focusCamera, boundsQConfig).Contains(inputDevicePos) || - targetObjects.FindAll(b => a.transform.IsChildOf(b.transform)).Count != 0); + _visibleObjectBuffer.RemoveAll(a => targetObjects.Contains(a) || + !ObjectBounds.CalcScreenRect(a, focusCamera, boundsQConfig).Contains(inputDevicePos) || + targetObjects.FindAll(b => a.transform.IsChildOf(b.transform)).Count != 0 || + a.GetComponent()?.enabled == false); foreach (var visibleObject in _visibleObjectBuffer) { - if (!CanUseObjectAsSnapDestination(visibleObject)) - continue; + if (!CanUseObjectAsSnapDestination(visibleObject)) continue; GameObjectType objectType = visibleObject.GetGameObjectType(); - if (objectType == GameObjectType.Mesh || objectType == GameObjectType.Sprite) - _destinationObjects.Add(visibleObject); + if (objectType == GameObjectType.Mesh || objectType == GameObjectType.Sprite) _destinationObjects.Add(visibleObject); } } } diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Scene/Grid/XZGridCell.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Scene/Grid/XZGridCell.cs index eb6774fd..3a610fb6 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Scene/Grid/XZGridCell.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Runtime Package Common/Scene/Grid/XZGridCell.cs @@ -44,9 +44,9 @@ namespace RTG return new XZGridCell(cellIndexX, cellIndexZ, cellMin, cellMax, parentGrid); } - public void GetCenterAndCorners(ref List centerAndCorners) + public List GetCenterAndCorners() { - centerAndCorners.Clear(); + var centerAndCorners = new List(); centerAndCorners.Add(Center); Vector3 minToMax = _max - _min; @@ -54,6 +54,8 @@ namespace RTG centerAndCorners.Add(_min + Vector3.forward * minToMax.z); centerAndCorners.Add(_max); centerAndCorners.Add(_min + Vector3.right * minToMax.x); + + return centerAndCorners; } } } diff --git a/Assets/Scripts/Studio/AssetTool/CustomAssetRenderObject.cs b/Assets/Scripts/Studio/AssetTool/CustomAssetRenderObject.cs index dbc17d21..641f9024 100644 --- a/Assets/Scripts/Studio/AssetTool/CustomAssetRenderObject.cs +++ b/Assets/Scripts/Studio/AssetTool/CustomAssetRenderObject.cs @@ -52,6 +52,7 @@ namespace Studio.AssetTool matCubeCollided = Resources.Load("Materials/Mat_CubeCollided"); boxCollider.gameObject.layer = LayerMask.NameToLayer("TwinObject"); + objectRenderer.gameObject.layer = LayerMask.NameToLayer("TwinObject"); twinObjectMask = LayerMask.GetMask("TwinObject"); } // Start is called once before the first execution of Update after the MonoBehaviour is created -- 2.48.1.windows.1 From 5aaad7feefdfbd3d4c342df9f2e7dc25fb394de1 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:56:12 +0900 Subject: [PATCH 4/4] =?UTF-8?q?RTG=20=EC=94=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/0.30.0.unity | 10 +++++----- .../Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Assets/Scenes/0.30.0.unity b/Assets/Scenes/0.30.0.unity index eddeffc2..c3b4fb69 100644 --- a/Assets/Scenes/0.30.0.unity +++ b/Assets/Scenes/0.30.0.unity @@ -4991,12 +4991,12 @@ MonoBehaviour: _scaleSensitivity: 1 _moveGizmoSettings3D: _canBeDisplayed: 1 - _isExpanded: 0 + _isExpanded: 1 _vertexSnapSettings: _canBeDisplayed: 1 _isExpanded: 1 - _snapDestinationLayers: -1 - _canSnapToGrid: 1 + _snapDestinationLayers: -4095 + _canSnapToGrid: 0 _canSnapToObjectVerts: 1 _sglSliderSettings: - _lineHoverEps: 0.7 @@ -9801,7 +9801,7 @@ GameObject: - component: {fileID: 1833346087} - component: {fileID: 1833346086} - component: {fileID: 1833346090} - m_Layer: 0 + m_Layer: 6 m_Name: Plane m_TagString: Untagged m_Icon: {fileID: 0} @@ -10136,7 +10136,7 @@ MonoBehaviour: _settings: _canBeDisplayed: 1 _isExpanded: 1 - _physicsMode: 1 + _physicsMode: 2 --- !u!224 &1959729457 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 5526574206638406261, guid: ea83f56b6eed48b4d98d8ee2b8f4b6e9, type: 3} diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs index 759fcb7e..87a19444 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/Gizmos/Drag/GizmoObjectVertexSnapDrag3D.cs @@ -98,7 +98,6 @@ namespace RTG protected bool GetWorldPointClosestToInputDevice(Camera focusCamera, IEnumerable gameObjects, out Vector3 point) { - Debug.Log("enter " + gameObjects.Count()); point = Vector3.zero; if (gameObjects == null) return false; if (!RTInputDevice.Get.Device.HasPointer()) return false; -- 2.48.1.windows.1