Files
VigilModManager/UI/Components/UILayoutRebuilder.cs
Exil Productions 74e53205f4 Initial Code
2025-11-11 03:10:52 +01:00

20 lines
430 B
C#

using UnityEngine;
using UnityEngine.UI;
namespace VMM.UI.Components
{
internal class UILayoutRebuilder : MonoBehaviour
{
RectTransform parentRect;
void OnEnable()
{
if(parentRect == null)
{
parentRect = transform.parent.GetComponent<RectTransform>();
}
LayoutRebuilder.ForceRebuildLayoutImmediate(parentRect);
}
}
}