Esempio n. 1
0
        /// <summary>
        /// Applies a theme to an element and its children
        /// </summary>
        public void ApplyThemeRecurse(Transform root, UIThemeAsset theme)
        {
            if (CoreParams.UIThemeMode == UIThemePolicy.Disabled || theme == null)
            {
                return;
            }

            ThemeEngine.ApplyThemeToAll(root, theme);
        }
Esempio n. 2
0
        /// <summary>
        /// Applies a theme to an element and its children
        /// </summary>
        public void ApplyThemeRecurse(Transform root, UIThemeAsset theme)
        {
            if (CoreParams.UIThemeMode == UIThemePolicy.Disabled)
            {
                LogWarning($"Can't apply theme to element because theme engine is disabled!");
                return;
            }

            if (theme == null)
            {
                LogWarning($"Can't apply theme to element because theme is null!");
                return;
            }

            ThemeEngine.ApplyThemeToAll(root, theme);
        }