From 13a7291a14ca743963f864d4ce7bac82e7007479 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 13:36:35 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=20->=20?= =?UTF-8?q?=EC=BA=90=EB=A6=AD=ED=84=B0=20=EB=A0=88=EC=9D=B4=EC=96=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD,=20=EC=9B=94=EB=93=9CUI=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=20=EC=B6=94=EA=B0=80,=20=EC=9B=94=EB=93=9C=20UI=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Settings/PC_Renderer.asset | 4 +- .../Common/RestaurantOrder.prefab | 7 +- .../_Addressables/Materials/Restaurant.meta | 8 + .../Materials/Restaurant/Order.meta | 8 + .../Order/SpatialUi_SpriteBubble.mat | 368 ++++++++++++++++++ .../Order/SpatialUi_SpriteBubble.mat.meta | 8 + .../Materials/Restaurant/Order/bubble.png | 3 + .../Restaurant/Order/bubble.png.meta | 117 ++++++ .../_Addressables/Prefabs/CustomerNpc.prefab | 34 +- .../Prefabs/RestaurantNpc.prefab | 32 ++ .../Component/PropUiDisplayComponent.cs | 69 +++- .../Component/RestaurantUiDisplayComponent.cs | 22 ++ ProjectSettings/TagManager.asset | 4 +- 13 files changed, 666 insertions(+), 18 deletions(-) create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant.meta create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order.meta create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat.meta create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta diff --git a/Assets/Settings/PC_Renderer.asset b/Assets/Settings/PC_Renderer.asset index 36d385602..817b39bc3 100644 --- a/Assets/Settings/PC_Renderer.asset +++ b/Assets/Settings/PC_Renderer.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58e66ea6da44f2d670e8317b778ec45ec4f1e45b9db64a252486547af8db9726 -size 9717 +oid sha256:128038ec4bebf184e3e25685d6ba8b93d1185d041df5a4d32f55d434ae3c89f8 +size 10883 diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index c6b9273d8..da054320c 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -197,7 +197,7 @@ MonoBehaviour: SerializedFormat: 2 SerializedBytes: ReferencedUnityObjects: - - {fileID: 2100000, guid: efc890589b4c46948885cd750384bc6f, type: 2} + - {fileID: 2100000, guid: cecea4c48dc174e34973ec5b33b2b2a9, type: 2} SerializedBytesString: Prefab: {fileID: 0} PrefabModificationsReferencedUnityObjects: [] @@ -241,7 +241,10 @@ MonoBehaviour: - Name: Entry: 8 Data: - _temporarySprite: {fileID: 21300000, guid: deef7d28045284f449ec0c47e1cbbcdc, type: 3} + _offset: {x: 0, y: 1.5, z: 1.35} + _rotation: {x: 40, y: 0, z: 0} + _temporarySprite: {fileID: 21300000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} + _fixedSpriteSize: {x: 0.2, y: 0.2} --- !u!114 &1332098886975329103 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant.meta b/Assets/_DDD/_Addressables/Materials/Restaurant.meta new file mode 100644 index 000000000..486796647 --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af3aa25466d5e442a84ae048b92da1ae +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order.meta b/Assets/_DDD/_Addressables/Materials/Restaurant/Order.meta new file mode 100644 index 000000000..add52414f --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5c1edc9254d7f455b9d985b586d860b5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat new file mode 100644 index 000000000..c81351ea7 --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat @@ -0,0 +1,368 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SpatialUi_SpriteBubble + m_Shader: {fileID: 4800000, guid: 13c02b14c4d048fa9653293d54f6e0e1, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackgroundTexture: + m_Texture: {fileID: 2800000, guid: f88e7478e74a14cb6a820978eb9f452f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorRampTex: + m_Texture: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorRampTexGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorSwapTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeBurnTex: + m_Texture: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlowTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineDistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTex: + m_Texture: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OverlayTex: + m_Texture: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpriteTexture: + m_Texture: {fileID: 2800000, guid: 7394cfdc5ad4642058b80a859c8a7319, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _AddPrecomputedVelocity: 0 + - _Alpha: 1 + - _AlphaClip: 0 + - _AlphaCutoffValue: 0.25 + - _AlphaOutlineBlend: 1 + - _AlphaOutlineGlow: 5 + - _AlphaOutlineMinAlpha: 0 + - _AlphaOutlinePower: 1 + - _AlphaRoundThreshold: 0.5 + - _AlphaToMask: 0 + - _BillboardY: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BlurHD: 0 + - _BlurIntensity: 10 + - _Brightness: 0 + - _BumpScale: 1 + - _ChromAberrAlpha: 0.4 + - _ChromAberrAmount: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _ClipUvDown: 0 + - _ClipUvLeft: 0 + - _ClipUvRight: 0 + - _ClipUvUp: 0 + - _ColorChangeLuminosity: 0 + - _ColorChangeTolerance: 0.25 + - _ColorChangeTolerance2: 0.25 + - _ColorChangeTolerance3: 0.25 + - _ColorMask: 15 + - _ColorRampBlend: 1 + - _ColorRampLuminosity: 0 + - _ColorRampOutline: 0 + - _ColorSwapBlend: 1 + - _ColorSwapBlueLuminosity: 0.5 + - _ColorSwapGreenLuminosity: 0.5 + - _ColorSwapRedLuminosity: 0.5 + - _Contrast: 1 + - _Cull: 2 + - _CullingOption: 0 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DistortAmount: 0.5 + - _DistortTexXSpeed: 5 + - _DistortTexYSpeed: 5 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EditorDrawers: 6 + - _EnableExternalAlpha: 0 + - _EnvironmentReflections: 1 + - _FadeAmount: -0.1 + - _FadeBurnGlow: 2 + - _FadeBurnTransition: 0.075 + - _FadeBurnWidth: 0.025 + - _FishEyeUvAmount: 0.35 + - _FlickerAlpha: 0 + - _FlickerFreq: 0.2 + - _FlickerPercent: 0.05 + - _GhostBlend: 1 + - _GhostColorBoost: 1 + - _GhostTransparency: 0 + - _GlitchAmount: 3 + - _GlitchSize: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Glow: 10 + - _GlowGlobal: 1 + - _GradBlend: 1 + - _GradBoostX: 1.2 + - _GradBoostY: 1.2 + - _GradIsRadial: 0 + - _GrassManualAnim: 1 + - _GrassManualToggle: 0 + - _GrassRadialBend: 0.1 + - _GrassSpeed: 2 + - _GrassWind: 20 + - _GreyscaleBlend: 1 + - _GreyscaleLuminosity: 0 + - _GreyscaleOutline: 0 + - _HandDrawnAmount: 10 + - _HandDrawnSpeed: 5 + - _HitEffectBlend: 1 + - _HitEffectGlow: 5 + - _HologramBlend: 1 + - _HologramMaxAlpha: 0.75 + - _HologramMinAlpha: 0.1 + - _HologramStripesAmount: 0.1 + - _HologramStripesSpeed: 4.5 + - _HologramUnmodAmount: 0 + - _HsvBright: 1 + - _HsvSaturation: 1 + - _HsvShift: 180 + - _InnerOutlineAlpha: 1 + - _InnerOutlineGlow: 4 + - _InnerOutlineThickness: 1 + - _MaxXUV: 1 + - _MaxYUV: 1 + - _Metallic: 0 + - _MinXUV: 0 + - _MinYUV: 0 + - _MotionBlurAngle: 0.1 + - _MotionBlurDist: 1.25 + - _MyDstMode: 10 + - _MySrcMode: 5 + - _NegativeAmount: 1 + - _OcclusionStrength: 1 + - _OffsetUvX: 0 + - _OffsetUvY: 0 + - _OnlyInnerOutline: 0 + - _OnlyOutline: 0 + - _OutlineAlpha: 1 + - _OutlineDistortAmount: 0.5 + - _OutlineDistortTexXSpeed: 5 + - _OutlineDistortTexYSpeed: 5 + - _OutlineGlow: 1.5 + - _OutlinePixelWidth: 1 + - _OutlineTexXSpeed: 10 + - _OutlineTexYSpeed: 0 + - _OutlineWidth: 0.004 + - _OverlayBlend: 1 + - _OverlayGlow: 1 + - _OverlayTextureScrollXSpeed: 0.25 + - _OverlayTextureScrollYSpeed: 0.25 + - _Parallax: 0.005 + - _PinchUvAmount: 0.35 + - _PixelateSize: 32 + - _PosterizeGamma: 0.75 + - _PosterizeNumColors: 8 + - _PosterizeOutline: 0 + - _QueueOffset: 0 + - _RadialClip: 45 + - _RadialClip2: 0 + - _RadialStartAngle: 90 + - _RandomSeed: 0 + - _ReceiveShadows: 1 + - _RectSize: 1 + - _RotateUvAmount: 0 + - _RoundWaveSpeed: 2 + - _RoundWaveStrength: 0.7 + - _ShadowAlpha: 0.5 + - _ShadowX: 0.1 + - _ShadowY: -0.05 + - _ShakeUvSpeed: 2.5 + - _ShakeUvX: 1.5 + - _ShakeUvY: 1 + - _ShineGlow: 1 + - _ShineLocation: 0.5 + - _ShineRotate: 0 + - _ShineWidth: 0.1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Surface: 0 + - _TextureScrollXSpeed: 1 + - _TextureScrollYSpeed: 0 + - _TwistUvAmount: 1 + - _TwistUvPosX: 0.5 + - _TwistUvPosY: 0.5 + - _TwistUvRadius: 0.75 + - _WarpScale: 0.5 + - _WarpSpeed: 8 + - _WarpStrength: 0.025 + - _WaveAmount: 7 + - _WaveSpeed: 10 + - _WaveStrength: 7.5 + - _WaveX: 0 + - _WaveY: 0.5 + - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 + - _ZTestMode: 4 + - _ZWrite: 1 + - _ZoomUvAmount: 0.5 + m_Colors: + - _AlphaOutlineColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _ColorChangeNewCol: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeNewCol2: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeNewCol3: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeTarget: {r: 1, g: 0, b: 0, a: 1} + - _ColorChangeTarget2: {r: 1, g: 0, b: 0, a: 1} + - _ColorChangeTarget3: {r: 1, g: 0, b: 0, a: 1} + - _ColorSwapBlue: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapGreen: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapRed: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FadeBurnColor: {r: 1, g: 1, b: 0, a: 1} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _GlowColor: {r: 1, g: 1, b: 1, a: 1} + - _GradBotLeftCol: {r: 0, g: 0, b: 1, a: 1} + - _GradBotRightCol: {r: 0, g: 1, b: 0, a: 1} + - _GradTopLeftCol: {r: 1, g: 0, b: 0, a: 1} + - _GradTopRightCol: {r: 1, g: 1, b: 0, a: 1} + - _GreyscaleTintColor: {r: 1, g: 1, b: 1, a: 1} + - _HitEffectColor: {r: 1, g: 1, b: 1, a: 1} + - _HologramStripeColor: {r: 0, g: 1, b: 1, a: 1} + - _InnerOutlineColor: {r: 1, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 1, a: 1} + - _OverlayColor: {r: 1, g: 1, b: 1, a: 1} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0, g: 0, b: 0, a: 1} + - _ShineColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &5575994803489782819 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat.meta b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat.meta new file mode 100644 index 000000000..a82da59fd --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cecea4c48dc174e34973ec5b33b2b2a9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png new file mode 100644 index 000000000..20e5e813d --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5717b1f64428e89ba75c0be9c4ce16281be2c762b584922129d5a048501dd7d +size 3799 diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta new file mode 100644 index 000000000..e7bbcd418 --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 94f9e78fc7b864b93842bdfa21276f09 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 5ee65ca4d..234795d0e 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -14,7 +14,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3540956906288785900, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 0 + value: 6 objectReference: {fileID: 0} - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Data.m_UniqueID @@ -1672,6 +1672,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3983248675539552489, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: zSpacing + value: -0.0001 + objectReference: {fileID: 0} - target: {fileID: 3983248675539552489, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: initialSkinName value: Casper @@ -1680,10 +1684,22 @@ PrefabInstance: propertyPath: skeletonDataAsset value: objectReference: {fileID: 11400000, guid: 90ef4d2128c770b4cb83806c33867a79, type: 2} + - target: {fileID: 4246001044237372826, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4900607124439125211, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 5108021082109611361, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: _availableInteractions value: 2 objectReference: {fileID: 0} + - target: {fileID: 5523461449651244940, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: gravity.x value: NaN @@ -1708,6 +1724,14 @@ PrefabInstance: propertyPath: alwaysDrawGizmos value: 1 objectReference: {fileID: 0} + - target: {fileID: 6312111630636169229, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6336425934484470474, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_SortingOrder + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6336425934484470474, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Materials.Array.size value: 4 @@ -1728,6 +1752,10 @@ PrefabInstance: propertyPath: 'm_Materials.Array.data[3]' value: objectReference: {fileID: 2100000, guid: d018debe5b8bedf4c8f19cba9e4facec, type: 2} + - target: {fileID: 6558328110360087691, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 6826437533270866908, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: externalBehavior value: @@ -1750,7 +1778,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 16 + value: 6 objectReference: {fileID: 0} - target: {fileID: 7545136660434259176, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Constraints @@ -1762,7 +1790,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8155105186346135386, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 0 + value: 6 objectReference: {fileID: 0} - target: {fileID: 8165702938223525558, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: graphMask.value diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab index 992df8657..f36c6d194 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab @@ -12,6 +12,10 @@ PrefabInstance: propertyPath: _initialSkinName value: Casper objectReference: {fileID: 0} + - target: {fileID: 1549638263379651312, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 1761643478070701343, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} propertyPath: m_LocalScale.x value: 2 @@ -64,10 +68,34 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 2182479135931305606, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} propertyPath: m_Name value: RestaurantNpc objectReference: {fileID: 0} + - target: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6791841979869644848, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7190839386876602598, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7741631174553725873, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 8389753198886579169, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} - target: {fileID: 8683566178618629536, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} propertyPath: m_Materials.Array.size value: 0 @@ -88,6 +116,10 @@ PrefabInstance: propertyPath: 'm_Materials.Array.data[3]' value: objectReference: {fileID: 2100000, guid: d018debe5b8bedf4c8f19cba9e4facec, type: 2} + - target: {fileID: 8715759041625857895, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 127430239903465757, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} m_RemovedGameObjects: [] diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index 81b715375..20651703d 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -7,10 +7,16 @@ namespace DDD.Restaurant { public abstract class PropUiDisplayComponent : SerializedMonoBehaviour where T : Enum { + [SerializeField] + protected Vector3 _offset = new Vector3(0.0f, 0.75f, 0.675f); + [SerializeField] + protected Vector3 _rotation = new Vector3(40.0f, 0, 0); private IInteractionSubsystemObject _interactionSubsystemObject; private Dictionary _materialDictionary; - private T _prevInteractionType; + private T _currentInteractionType; + protected IInteractable _interactable; protected SpriteRenderer _spriteRenderer; + protected Transform _spriteTransform; private void Awake() { Initialize(); @@ -20,8 +26,7 @@ private void Awake() protected virtual void Initialize() { - bool isInteractionSubsystem = gameObject.TryGetComponent(out _interactionSubsystemObject); - var interactable = GetComponent(); + bool isInteractionSubsystem = GetOwnerInteractable(out _interactable); if (!isInteractionSubsystem) { Debug.LogError($"Interaction Subsystem<{typeof(T)}> is not exist"); @@ -30,31 +35,77 @@ protected virtual void Initialize() // TODO: 임시 나중에 제대로 수정할 것 var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform); - uiGameObject.transform.position = interactable.GetInteractionPoints()[0] + Vector3.up * 2; + _spriteTransform = uiGameObject.transform; + uiGameObject.layer = LayerMask.NameToLayer("WorldUI"); + UpdateSpriteTransform(); + _spriteRenderer = uiGameObject.AddComponent(); _spriteRenderer.enabled = false; _materialDictionary = SetMaterialDictionary(); } + private void UpdateSpriteTransform() + { + _spriteTransform.position = GetDisplayPosition(); + _spriteTransform.rotation = Quaternion.Euler(GetDisplayRotation()); + } + + private bool GetOwnerInteractable(out IInteractable interactable) + { + bool isInteractionSubsystem = gameObject.TryGetComponent(out _interactionSubsystemObject); + interactable = GetComponent(); + return isInteractionSubsystem; + } + + protected virtual Vector3 GetDisplayPosition() + { + return transform.position + _offset; + } + + protected virtual Vector3 GetDisplayRotation() + { + return _rotation; + } + private void Update() { - T currentInteractionType = _interactionSubsystemObject.GetInteractionSubsystemType(); - if (EqualityComparer.Default.Equals(_prevInteractionType, currentInteractionType)) return; - _prevInteractionType = currentInteractionType; - UpdateView(_prevInteractionType); + T interactionType = _interactionSubsystemObject.GetInteractionSubsystemType(); + if (EqualityComparer.Default.Equals(_currentInteractionType, interactionType)) return; + SetCurrentInteractionType(interactionType); + UpdateView(GetCurrentInteractionType()); + } + + public T GetCurrentInteractionType() + { + return _currentInteractionType; + } + + public void SetCurrentInteractionType(T interactionType) + { + _currentInteractionType = interactionType; } private void UpdateView(T state) + { + if (UpdateSpriteMaterial(state)) + { + return; + } + UpdateSpriteTransform(); + } + + private bool UpdateSpriteMaterial(T state) { if (!_materialDictionary.TryGetValue(state, out var material) || material == null) { // TODO 캔버스 다운 _spriteRenderer.enabled = false; - return; + return true; } // ui 머티리얼 교체 _spriteRenderer.enabled = true; _spriteRenderer.material = material; + return false; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 21098a4b0..cebc84afe 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -10,6 +10,8 @@ public class RestaurantUiDisplayComponent : PropUiDisplayComponent _materialDictionary = new(); protected override Dictionary SetMaterialDictionary() @@ -21,6 +23,26 @@ protected override void Initialize() { base.Initialize(); _spriteRenderer.sprite = _temporarySprite; + _spriteRenderer.transform.localScale = _fixedSpriteSize; + } + + protected override Vector3 GetDisplayPosition() + { + if (GetCurrentInteractionType() == RestaurantOrderType.Order) + { + // Find interaction points from interactable owner + if (_interactable == null) + { + return base.GetDisplayPosition(); + } + + var points = _interactable.GetInteractionPoints(); + if (points is { Length: > 0 }) + { + return points[0] + _offset; + } + } + return base.GetDisplayPosition(); } } } \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 63e0e52b4..821df1908 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:411a0243cb87e0bcd8781e3198ba1f82af7279c14555e3b2db93884f5b7ea700 -size 636 +oid sha256:6c91ea0bee02701e2f20333be55e0b5b54c388d26e9745e469d9479529f01ef6 +size 633