Exemplo n.º 1
0
 private void OnEnable()
 {
     if (popRef == null)
     {
         popRef = FindObjectOfType <PopRef>();
     }
     if (flexibleUIData == null)
     {
         flexibleUIData = popRef.themeSwap.allFlexibleUIData[popRef.themeSwap.activeIndex];
     }
     OnSkinUI();
 }
Exemplo n.º 2
0
    /// <summary>
    /// Refreshs all <see cref="FlexibleUI"/> that uses the same
    /// <see cref="FlexibleUI"/>.
    /// </summary>
    /// <param name="data">Data.</param>
    public static void RefreshAll(FlexibleUIData data)
    {
        var Flexibles = FindObjectsOfType <FlexibleUI>();

        if (Flexibles.Length == 0)
        {
            Debug.LogWarning("No active FlexibleUI components found!");
            return;
        }
        for (int i = 0; i < Flexibles.Length; i++)
        {
            if (Flexibles[i].skinData == data)
            {
                Flexibles[i].OnSkinUI();
            }
        }
    }
Exemplo n.º 3
0
 public static void ChangeSkin(FlexibleUI script, FlexibleUIData skin)
 {
     script.skinData = skin;
 }