/// <summary>
        /// Get a new theme instance and load it with settings
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="host"></param>
        /// <param name="lists"></param>
        /// <returns></returns>
        public static InteractableThemeBase GetTheme(InteractableThemePropertySettings settings, GameObject host)
        {
            Type themeType = Type.GetType(settings.AssemblyQualifiedName);
            InteractableThemeBase theme = (InteractableThemeBase)Activator.CreateInstance(themeType);

            theme.Init(host, settings);
            return(theme);
        }
Exemplo n.º 2
0
        public List <InteractableThemeBase> CreateThemeEngines()
        {
            List <InteractableThemeBase> results = new List <InteractableThemeBase>();

            if (Theme != null)
            {
                foreach (var setting in Theme.Settings)
                {
                    Type themeType = Type.GetType(setting.AssemblyQualifiedName);
                    InteractableThemeBase theme = (InteractableThemeBase)Activator.CreateInstance(themeType);
                    theme.Init(Target, setting);

                    results.Add(theme);
                }
            }

            return(results);
        }