Exemple #1
0
        private void Initialize()
        {
            modelBuilder = new YamlModelBuilder(config);
            var ModelDictionary = modelBuilder.GetModels <Dictionary <string, Dictionary <string, object> > >();

            List <IElement> elements = new List <IElement>();

            foreach (var kvp in ModelDictionary)
            {
                elements.Add(GenerateElementFromConfig(kvp));
            }

            ElementDictionary = elements.ToDictionary(x => x.Name, x => x);

            Debug.Log($"Loaded Elements: {string.Join(", ", ElementDictionary.Keys.Select(x => x.ToString().Title()))}");
            Initialized = true;
        }