From 6e5f0d2234398ed0bbd567f48d8ae2eff42972fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Thu, 28 Aug 2025 19:51:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=83=81=ED=98=B8=EC=9E=91=EC=9A=A9=20UI=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 144 +++++++----------- .../Component/PropUiDisplayComponent.cs | 16 +- .../Component/RestaurantUiDisplayComponent.cs | 8 + 3 files changed, 66 insertions(+), 102 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 214ee4363..416b52c32 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -98,11 +98,10 @@ GameObject: - component: {fileID: 3697702677815423220} - component: {fileID: 3591347921553422000} - component: {fileID: 4456475204957017828} - - component: {fileID: 7969024827453302529} - - component: {fileID: -6672057808015107341} - component: {fileID: 2950132940454135295} - component: {fileID: 29040892075516248} - component: {fileID: 1332098886975329103} + - component: {fileID: 3786917981383564029} m_Layer: 7 m_Name: RestaurantOrder m_TagString: Untagged @@ -160,7 +159,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _currentRestaurantOrderType: 0 ---- !u!114 &7969024827453302529 --- !u!135 &2950132940454135295 SphereCollider: m_ObjectHideFlags: 0 @@ -254,8 +252,56 @@ MonoBehaviour: - Name: Entry: 8 Data: ---- !u!212 &-6672057808015107341 -SpriteRenderer: + _temporarySprite: {fileID: 21300000, guid: deef7d28045284f449ec0c47e1cbbcdc, type: 3} +--- !u!114 &1332098886975329103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3} + m_Name: + m_EditorClassIdentifier: + _availableStyle: + Color: {r: 1, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _focusedStyle: + Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + Width: 1 + Opacity: 1 + _unavailableStyle: + Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + Width: 0.5 + Opacity: 1 + _objectiveStyle: + Color: {r: 0, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _breathingSpeed: 2 + _breathingRange: 0.3 + _enableBreathingEffect: 1 + _alphaCutOff: 0.5 + _combineMeshes: 1 + _constantWidth: 1 + _outlineQuality: 2 + _outlineIndependent: 1 + _outlineBlurPasses: 1 + _outlineSharpness: 8 + _currentOutlineType: 0 + _currentOpacityMultiplier: 1 +--- !u!114 &3786917981383564029 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + m_Enabled: 1 + m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} m_Name: m_EditorClassIdentifier: @@ -447,91 +493,3 @@ SpriteRenderer: hitFxFadeOutDuration: 0.25 hitFxColor: {r: 1, g: 1, b: 1, a: 1} hitFxRadius: 0.5 ---- !u!114 &1332098886975329103 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4103096974375017811} - m_Enabled: 0 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: 22cbc31c0f91548f096d10d462447973, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.34, y: 0.34} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3} - m_Name: - m_EditorClassIdentifier: - _availableStyle: - Color: {r: 1, g: 1, b: 1, a: 1} - Width: 1 - Opacity: 1 - _focusedStyle: - Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - Width: 1 - Opacity: 1 - _unavailableStyle: - Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} - Width: 0.5 - Opacity: 1 - _objectiveStyle: - Color: {r: 0, g: 1, b: 1, a: 1} - Width: 1 - Opacity: 1 - _breathingSpeed: 2 - _breathingRange: 0.3 - _enableBreathingEffect: 1 - _alphaCutOff: 0.5 - _combineMeshes: 1 - _constantWidth: 1 - _outlineQuality: 2 - _outlineIndependent: 1 - _outlineBlurPasses: 1 - _outlineSharpness: 8 - _currentOutlineType: 0 - _currentOpacityMultiplier: 1 diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index 43a5ab87a..81b715375 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -10,7 +10,7 @@ public abstract class PropUiDisplayComponent : SerializedMonoBehaviour where private IInteractionSubsystemObject _interactionSubsystemObject; private Dictionary _materialDictionary; private T _prevInteractionType; - private SpriteRenderer _spriteRenderer; + protected SpriteRenderer _spriteRenderer; private void Awake() { Initialize(); @@ -21,20 +21,18 @@ private void Awake() protected virtual void Initialize() { bool isInteractionSubsystem = gameObject.TryGetComponent(out _interactionSubsystemObject); + var interactable = GetComponent(); if (!isInteractionSubsystem) { Debug.LogError($"Interaction Subsystem<{typeof(T)}> is not exist"); return; } - if (!TryGetComponent(out _spriteRenderer)) - { - _spriteRenderer = gameObject.AddComponent(); - // TODO 임시값, 나중에 제대로 수정할 것 - _spriteRenderer.sortingOrder = 100; - _spriteRenderer.enabled = false; - } - + // TODO: 임시 나중에 제대로 수정할 것 + var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform); + uiGameObject.transform.position = interactable.GetInteractionPoints()[0] + Vector3.up * 2; + _spriteRenderer = uiGameObject.AddComponent(); + _spriteRenderer.enabled = false; _materialDictionary = SetMaterialDictionary(); } diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 8113d294f..21098a4b0 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -8,11 +8,19 @@ namespace DDD.Restaurant { public class RestaurantUiDisplayComponent : PropUiDisplayComponent { + [SerializeField] + private Sprite _temporarySprite; [OdinSerialize] private Dictionary _materialDictionary = new(); protected override Dictionary SetMaterialDictionary() { return _materialDictionary; } + + protected override void Initialize() + { + base.Initialize(); + _spriteRenderer.sprite = _temporarySprite; + } } } \ No newline at end of file