using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; using KairoEngine.Core; using KairoEngine.Core.ConfigOptions; namespace KairoEngine.Core.ModuleSystem { [CreateAssetMenu(fileName = "GameConfig", menuName = "KairoEngine/GameConfig"), HideMonoScript] public class GameConfig : ScriptableObject { [ListDrawerSettings(DraggableItems = false, HideRemoveButton = true, ShowPaging = false)] [OnValueChanged("StartModule")] public List modules = new List(); [InlineProperty, HideLabel] public ConfigOptionsManager configOptions = new ConfigOptionsManager(); private void StartModule() { foreach (var module in modules) { if(module.isInitialized == false) { module.isInitialized = true; module.gameConfig = this; } } } } }