From e1015a713a25a0b7d1d30ae859564b71531aca77 Mon Sep 17 00:00:00 2001 From: Ino Date: Sat, 20 Sep 2025 03:43:24 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9B=94=EC=B3=90=EB=B3=B4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ResWork/ShowAlbum/ShowAlbum.cs | 4 +- Assets/ResWork/ShowAlbum/ShowAlbum.prefab | 139 ++++++++++++++++++++++ Assets/ResWork/ShowAlbum/ShowPanel.cs | 6 +- Assets/Scenes/SampleScene.unity | 72 +---------- Assets/Scripts/UI/AlbumCard.cs | 2 +- Assets/Scripts/UI/ProfileCard.cs | 4 +- 6 files changed, 150 insertions(+), 77 deletions(-) diff --git a/Assets/ResWork/ShowAlbum/ShowAlbum.cs b/Assets/ResWork/ShowAlbum/ShowAlbum.cs index 272e5fb..0d02ffb 100644 --- a/Assets/ResWork/ShowAlbum/ShowAlbum.cs +++ b/Assets/ResWork/ShowAlbum/ShowAlbum.cs @@ -10,9 +10,9 @@ public class ShowAlbum : MonoBehaviourSingletonTemplate m_ShowPanel.gameObject.SetActive(false); } - public void Show(T data) + public void Show(T data, bool preview) { m_MainUICanvas.SetActive(false); - m_ShowPanel.Set(data, () => { m_MainUICanvas.SetActive(true); }); + m_ShowPanel.Set(data, preview, () => { m_MainUICanvas.SetActive(true); }); } } \ No newline at end of file diff --git a/Assets/ResWork/ShowAlbum/ShowAlbum.prefab b/Assets/ResWork/ShowAlbum/ShowAlbum.prefab index 628c3f1..257b0b5 100644 --- a/Assets/ResWork/ShowAlbum/ShowAlbum.prefab +++ b/Assets/ResWork/ShowAlbum/ShowAlbum.prefab @@ -310,7 +310,144 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f6f656bf230b7a488b1a5c0763cbe6f, type: 3} m_Name: m_EditorClassIdentifier: + m_MainUICanvas: {fileID: 0} m_ShowPanel: {fileID: 3645905085550438875} +--- !u!1 &4496871772968282525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4552201222623461871} + - component: {fileID: 5389900562015601476} + - component: {fileID: 5746505822520106488} + m_Layer: 5 + m_Name: preview + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4552201222623461871 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4496871772968282525} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4838641313505026441} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -122, y: 45} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5389900562015601476 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4496871772968282525} + m_CullTransparentMesh: 1 +--- !u!114 &5746505822520106488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4496871772968282525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\uD6D4\uCCD0\uBCF4\uAE30 \uC911..." + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: f0e824099790d3445af94a5b86b5cc4a, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 25 + m_fontSizeMax: 100 + m_fontStyle: 0 + m_HorizontalAlignment: 4 + m_VerticalAlignment: 4096 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &4682878790792817058 GameObject: m_ObjectHideFlags: 0 @@ -812,6 +949,7 @@ RectTransform: m_ConstrainProportionsScale: 1 m_Children: - {fileID: 182769047467059713} + - {fileID: 4552201222623461871} m_Father: {fileID: 456846148437764429} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -871,6 +1009,7 @@ MonoBehaviour: m_EditorClassIdentifier: i_image: {fileID: 4592172516078748411} go_btns: {fileID: 8461513849143437229} + go_preview: {fileID: 4496871772968282525} isFull: 0 --- !u!1 &8755086048526332932 GameObject: diff --git a/Assets/ResWork/ShowAlbum/ShowPanel.cs b/Assets/ResWork/ShowAlbum/ShowPanel.cs index 3f01887..c7768e6 100644 --- a/Assets/ResWork/ShowAlbum/ShowPanel.cs +++ b/Assets/ResWork/ShowAlbum/ShowPanel.cs @@ -1,6 +1,5 @@ using System; using UnityEngine; -using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; public class ShowAlbumBase { public string s_Image; } @@ -8,7 +7,7 @@ public class ShowAlbumBase { public string s_Image; } public class ShowPanel : MonoBehaviour { public SpriteRenderer i_image; - public GameObject go_btns; + public GameObject go_btns, go_preview; public bool isFull; int zoomStep = 0; @@ -16,13 +15,14 @@ public class ShowPanel : MonoBehaviour float original_orthographicSize; Action act_Close; - public void Set(T data, Action actClose) + public void Set(T data, bool preview, Action actClose) { act_Close = actClose; ADInfo.Ins.Set_Banner(false); gameObject.SetActive(true); go_btns.SetActive(true); + go_preview.SetActive(preview); i_image.enabled = false; AddrResourceMgr.Ins.LoadObject((data as ShowAlbumBase).s_Image, handle => diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index bb1f19f..77b4066 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -9807,7 +9807,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -68.599976} + m_AnchoredPosition: {x: 0, y: -68.6001} m_SizeDelta: {x: 0, y: 137.1} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &371721586 @@ -48970,7 +48970,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -44.400024} + m_AnchoredPosition: {x: 0, y: -44.399902} m_SizeDelta: {x: 0, y: -519.7} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2093328781 @@ -50811,38 +50811,6 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 2569134205668460253, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2569134205668460253, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2569134205668460253, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2569134205668460253, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3113117796968207641, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3113117796968207641, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3113117796968207641, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3113117796968207641, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - target: {fileID: 3831263569033530073, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} propertyPath: m_MainUICanvas value: @@ -50851,38 +50819,6 @@ PrefabInstance: propertyPath: m_Name value: ShowAlbum objectReference: {fileID: 0} - - target: {fileID: 6606483948000639159, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6606483948000639159, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6606483948000639159, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6606483948000639159, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7286985885240280840, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7286985885240280840, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7286985885240280840, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7286985885240280840, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - target: {fileID: 8404604730602711012, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -50923,10 +50859,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 8461513849143437229, guid: 97b8f0a8fdbe18e4f85c11c67c111688, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/UI/AlbumCard.cs b/Assets/Scripts/UI/AlbumCard.cs index be4d265..472dcb1 100644 --- a/Assets/Scripts/UI/AlbumCard.cs +++ b/Assets/Scripts/UI/AlbumCard.cs @@ -51,6 +51,6 @@ public class AlbumCard : CardBase public void OnClick_Show() { - if (IsObtain()) ShowAlbum.Ins.Show(m_Data); + if (IsObtain()) ShowAlbum.Ins.Show(m_Data, false); } } \ No newline at end of file diff --git a/Assets/Scripts/UI/ProfileCard.cs b/Assets/Scripts/UI/ProfileCard.cs index 8964108..38ab5c5 100644 --- a/Assets/Scripts/UI/ProfileCard.cs +++ b/Assets/Scripts/UI/ProfileCard.cs @@ -52,7 +52,9 @@ public class ProfileCard : MonoBehaviour { // 훔쳐보기 ADInfo.Ins.Show_AD(false, () => { - + var lst = table_album.Ins.Get_DataList(m_Data.n_GirlID); + var rdnData = lst[Random.Range(0, lst.Count)]; + ShowAlbum.Ins.Show(rdnData, true); }); }