UI HUGE UPDATE
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Bansonic;
|
||||
|
||||
public class equipIllusion : MonoBehaviour
|
||||
{
|
||||
@@ -803,13 +804,12 @@ public class equipIllusion : MonoBehaviour
|
||||
}
|
||||
|
||||
equipItemPrefab itemPrefab = eip.GetComponent<equipItemPrefab>();
|
||||
if (itemPrefab == null || itemPrefab.itemBtmColors == null || itemPrefab.itemBtmColors.Length == 0)
|
||||
if (itemPrefab == null)
|
||||
{
|
||||
return Color.white;
|
||||
}
|
||||
|
||||
int safeIndex = Mathf.Clamp(colorIndex, 0, itemPrefab.itemBtmColors.Length - 1);
|
||||
return itemPrefab.itemBtmColors[safeIndex];
|
||||
return itemPrefab.GetAccentColorByVisualIndex(colorIndex);
|
||||
}
|
||||
|
||||
private static void PersistEquipment(equipmentSO equipment)
|
||||
@@ -819,6 +819,12 @@ public class equipIllusion : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
equipmentGenerator.SaveRuntimeEquipmentState(equipment);
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(equipment);
|
||||
if (!Application.isPlaying)
|
||||
|
||||
Reference in New Issue
Block a user