fix: 아이콘이 정상적으로 출력되지 않는 오류 수정

This commit is contained in:
aube.lee
2025-03-10 01:50:20 +09:00
parent d5d56ca8cc
commit 9e925a6c86
19 changed files with 67 additions and 59 deletions

View File

@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 1465902235892889161}
- component: {fileID: 7199637668151358389}
- component: {fileID: 5037893579223492369}
- component: {fileID: 1286343195759334092}
- component: {fileID: 5474034017148599487}
m_Layer: 5
m_Name: Item Button
m_TagString: Untagged
@@ -108,7 +108,7 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1286343195759334092
--- !u!114 &5474034017148599487
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -117,7 +117,7 @@ MonoBehaviour:
m_GameObject: {fileID: 122146249855187030}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e890b5f706c997b4396fb3fc11938954, type: 3}
m_Script: {fileID: 11500000, guid: d4025d96cfa84304caf95db6a4f49d0c, type: 3}
m_Name:
m_EditorClassIdentifier:
coolTimeText: {fileID: 1611366555514620028}

View File

@@ -460,7 +460,7 @@ GameObject:
- component: {fileID: 3622686016877026920}
- component: {fileID: 6838856260058367113}
- component: {fileID: 8637807277690663409}
- component: {fileID: 5127688379423261843}
- component: {fileID: 5964648352921021872}
m_Layer: 5
m_Name: Skill Button
m_TagString: Untagged
@@ -550,14 +550,14 @@ MonoBehaviour:
m_MethodName: OnClickSkillButton
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 5127688379423261843}
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: TON.ControllerUI_SkillButton, Assembly-CSharp
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &5127688379423261843
--- !u!114 &5964648352921021872
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -566,7 +566,7 @@ MonoBehaviour:
m_GameObject: {fileID: 8426200199618059491}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35c94c75c6e511048b4a77d3682e1f85, type: 3}
m_Script: {fileID: 11500000, guid: f9d99c36ec531604e82c8aeebd6afa80, type: 3}
m_Name:
m_EditorClassIdentifier:
coolTimeText: {fileID: 1353060829719948495}
@@ -582,6 +582,7 @@ MonoBehaviour:
coolDown: 0
slotNumber: 0
requiredLevel: 0
maxHitCount: 0
<CurrentCoolDown>k__BackingField: 0
--- !u!1 &9104780789004064627
GameObject:

View File

@@ -1479,7 +1479,7 @@ GameObject:
- component: {fileID: 178720843269296823}
- component: {fileID: 2461189433906269157}
- component: {fileID: 8806745900426442480}
- component: {fileID: 1836485528427718722}
- component: {fileID: 8169316462191543975}
m_Layer: 5
m_Name: Rank Box
m_TagString: Untagged
@@ -1547,7 +1547,7 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1836485528427718722
--- !u!114 &8169316462191543975
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -1556,7 +1556,7 @@ MonoBehaviour:
m_GameObject: {fileID: 8201404655171497624}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5f063d17b315ac49b03acf8e9dd20b4, type: 3}
m_Script: {fileID: 11500000, guid: 4d47caa84e9a090419eb82f5e455a86d, type: 3}
m_Name:
m_EditorClassIdentifier:
rankBoxImage: {fileID: 8201404655171497624}

View File

@@ -161,7 +161,7 @@ GameObject:
- component: {fileID: 8074330830695280406}
- component: {fileID: 7221054774098027555}
- component: {fileID: 8618505599359909844}
- component: {fileID: 8968069870202076509}
- component: {fileID: 6783571582853110170}
- component: {fileID: 5331091819972320112}
m_Layer: 5
m_Name: Skill Slot
@@ -230,7 +230,7 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8968069870202076509
--- !u!114 &6783571582853110170
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -239,7 +239,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6583065413429247215}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19db9b1bf85c67042afc28005a6af101, type: 3}
m_Script: {fileID: 11500000, guid: 9cc7099481cd73d40a0c87d18da714c4, type: 3}
m_Name:
m_EditorClassIdentifier:
skillImage: {fileID: 6834027631568802153}

View File

@@ -168,7 +168,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
joystick: {fileID: 7288066023221573359}
skillButtonGroup: {fileID: 2009939342780089657}
skillButtonPrefab: {fileID: 1708453278417668396}
skillButtonPrefab: {fileID: 169483457724555279}
hpPotionCount: {fileID: 6063099989028787624}
mpPotionCount: {fileID: 3723411150709511038}
itemButtons:
@@ -1218,15 +1218,15 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
--- !u!114 &1708453278417668396 stripped
--- !u!114 &169483457724555279 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5127688379423261843, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_CorrespondingSourceObject: {fileID: 5964648352921021872, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 5808676351208836543}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35c94c75c6e511048b4a77d3682e1f85, type: 3}
m_Script: {fileID: 11500000, guid: f9d99c36ec531604e82c8aeebd6afa80, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7123232125577925591 stripped

View File

@@ -1269,7 +1269,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
scrollRect: {fileID: 6409563792739250610}
rankBoxPrefab: {fileID: 1836485528427718722, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
rankBoxPrefab: {fileID: 1955426377295528965}
uiPrefabList: []
createRankList: []
errorPopup: {fileID: 1150546113968813456}
@@ -3186,6 +3186,17 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
--- !u!114 &1955426377295528965 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8169316462191543975, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
m_PrefabInstance: {fileID: 7673060521725952674}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d47caa84e9a090419eb82f5e455a86d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7495923051705061397 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}

View File

@@ -865,7 +865,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
skillSlotGroup: {fileID: 8234641265010181104}
skillSlotPrefab: {fileID: 9204999392844245365}
skillSlotPrefab: {fileID: 6768435580117781938}
createSkillSlots: []
scrollRect: {fileID: 4479471774612506654}
skillInfoPrefab: {fileID: 5109309224848002243}
@@ -1211,7 +1211,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 502097972041828455}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.9999965
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@@ -1327,7 +1327,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00026580493}
m_AnchoredPosition: {x: 0, y: 0.00003553843}
m_SizeDelta: {x: 555, y: 200}
m_Pivot: {x: 0, y: 1}
--- !u!1001 &273107853452891176
@@ -1467,22 +1467,22 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
--- !u!224 &8342794310457916222 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
m_PrefabInstance: {fileID: 273107853452891176}
m_PrefabAsset: {fileID: 0}
--- !u!114 &9204999392844245365 stripped
--- !u!114 &6768435580117781938 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8968069870202076509, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
m_CorrespondingSourceObject: {fileID: 6783571582853110170, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
m_PrefabInstance: {fileID: 273107853452891176}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19db9b1bf85c67042afc28005a6af101, type: 3}
m_Script: {fileID: 11500000, guid: 9cc7099481cd73d40a0c87d18da714c4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8342794310457916222 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
m_PrefabInstance: {fileID: 273107853452891176}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7813689188184592971
PrefabInstance:
m_ObjectHideFlags: 0

View File

@@ -97,7 +97,7 @@ namespace TON
// UpdateUI();
});
}
public void UseGold(int amount, System.Action<bool> callback)
public void UseGold(int amount, System.Action<bool> callback = null)
{
if (goldAmount - amount < 0)
{

View File

@@ -1,12 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace TON
{
public class ControllerUI_ItemButton : MonoBehaviour
public class PotionButtonItem : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI coolTimeText;
[SerializeField] private Image coolTimeDimd;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e5f063d17b315ac49b03acf8e9dd20b4
guid: d4025d96cfa84304caf95db6a4f49d0c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -7,7 +7,7 @@ using UnityEngine.UI;
namespace TON
{
public class ControllerUI_SkillButton : MonoBehaviour
public class SkillButtonItem : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI coolTimeText;
[SerializeField] private Image coolTimeDimd;
@@ -63,6 +63,5 @@ namespace TON
{
UpdateCooldownUI(); // UI 업데이트
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e890b5f706c997b4396fb3fc11938954
guid: f9d99c36ec531604e82c8aeebd6afa80
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -6,7 +6,7 @@ using UnityEngine.UI;
namespace TON
{
public class SkillSettingUI_SkillSlot : MonoBehaviour
public class SkillSettingSlot : MonoBehaviour
{
public GameObject skillImage;
public GameObject lockerImage;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 19db9b1bf85c67042afc28005a6af101
guid: 9cc7099481cd73d40a0c87d18da714c4
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,9 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace TON
@@ -18,8 +16,8 @@ namespace TON
public Transform skillButtonGroup;
public ControllerUI_SkillButton skillButtonPrefab;
private List<ControllerUI_SkillButton> createdSkillButtons = new List<ControllerUI_SkillButton>();
public SkillButtonItem skillButtonPrefab;
private List<SkillButtonItem> createdSkillButtons = new List<SkillButtonItem>();
public UserItemData userItem { get; private set; } = new UserItemData();
// 보유 포션 수량
@@ -30,7 +28,7 @@ namespace TON
private int hpPotion = 0;
private int mpPotion = 0;
public List<ControllerUI_ItemButton> itemButtons = new List<ControllerUI_ItemButton>();
public List<PotionButtonItem> itemButtons = new List<PotionButtonItem>();
private void OnEnable()
{
@@ -60,7 +58,7 @@ namespace TON
List<SkillBase> activatedSkills = SkillDataManager.Singleton.GetEquippedSkills();
for (int i = 0; i < 3; i++)
{
ControllerUI_SkillButton newSkillButton = Instantiate(skillButtonPrefab, skillButtonGroup);
SkillButtonItem newSkillButton = Instantiate(skillButtonPrefab, skillButtonGroup);
newSkillButton.gameObject.SetActive(true);
if (i < activatedSkills.Count) // 해당 인덱스에 활성화된 스킬이 있을 경우
@@ -141,7 +139,7 @@ namespace TON
linkedCharactor.Attack();
}
public void OnClickSkillButton(ControllerUI_SkillButton button)
public void OnClickSkillButton(SkillButtonItem button)
{
linkedCharactor.SkillAttack(button.skillBase.SkillData.id);
}

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
@@ -8,7 +7,7 @@ using UnityEngine.UI;
namespace TON
{
public class RankingUI_RankBox : MonoBehaviour
public class RankBoxItem : MonoBehaviour
{
[SerializeField] private GameObject rankBoxImage;
[SerializeField] private GameObject pawImage;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 35c94c75c6e511048b4a77d3682e1f85
guid: 4d47caa84e9a090419eb82f5e455a86d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -13,9 +13,9 @@ namespace TON
// 전체 랭킹 리스트를 스크롤 형식으로 구현하기 위함
public ScrollRect scrollRect;
public RankingUI_RankBox rankBoxPrefab;
public RankBoxItem rankBoxPrefab;
public List<RectTransform> uiPrefabList = new List<RectTransform>();
public List<RankingUI_RankBox> createRankList = new List<RankingUI_RankBox>();
public List<RankBoxItem> createRankList = new List<RankBoxItem>();
[SerializeField] private GameObject errorPopup;
[SerializeField] private GameObject pawImage;
@@ -76,7 +76,7 @@ namespace TON
for (int i = 0; i < rankList.Count; i++)
{
ClearData clearData = rankList[i];
RankingUI_RankBox rankBox = Instantiate(rankBoxPrefab, scrollRect.content);
RankBoxItem rankBox = Instantiate(rankBoxPrefab, scrollRect.content);
rankBox.gameObject.SetActive(true);
rankBox.Initalize(i + 1, clearData);

View File

@@ -12,8 +12,8 @@ namespace TON
// 사용할 스킬 슬롯 3개 매핑을 위한 변수
public Transform skillSlotGroup;
public SkillSettingUI_SkillSlot skillSlotPrefab;
public List<SkillSettingUI_SkillSlot> createSkillSlots = new List<SkillSettingUI_SkillSlot>();
public SkillSettingSlot skillSlotPrefab;
public List<SkillSettingSlot> createSkillSlots = new List<SkillSettingSlot>();
// 전체 스킬 리스트를 스크롤 형식으로 구현하기 위함
public ScrollRect scrollRect;
@@ -73,7 +73,7 @@ namespace TON
for (int i = 0; i < 3; i++)
{
SkillSettingUI_SkillSlot newSkillSlot = Instantiate(skillSlotPrefab, skillSlotGroup);
SkillSettingSlot newSkillSlot = Instantiate(skillSlotPrefab, skillSlotGroup);
newSkillSlot.gameObject.SetActive(true);
if (skillMap.TryGetValue(i, out SkillBase skill))
@@ -144,7 +144,7 @@ namespace TON
public void OnClickSkillSlot()
{
GameObject selectedSlotGameObject = EventSystem.current.currentSelectedGameObject;
SkillSettingUI_SkillSlot selectedSlot = selectedSlotGameObject.GetComponent<SkillSettingUI_SkillSlot>();
SkillSettingSlot selectedSlot = selectedSlotGameObject.GetComponent<SkillSettingSlot>();
selectedSlotIndex = selectedSlot.SelectedSlot();
for (int i = 0; i < 3; i++)