using System.Collections; using System.Collections.Generic; using UnityEngine; using KairoEngine.Core; using KairoEngine.Core.ModuleSystem; using Sirenix.OdinInspector; namespace KairoEngine.UI { public class UiSystemModule : IGameModule { private string _name = "UI Module"; public string name { get => _name; set => _name = value; } public void Load(Transform parent) { Transform uiParent = CreateUiManager(parent); } public void Reset() { } private Transform CreateUiManager(Transform parent) { Transform UiTransform = parent.Find("UI"); GameObject uiObj; if(UiTransform == null) { uiObj = GameObject.Instantiate(new GameObject(), new Vector3(), Quaternion.identity, parent); uiObj.name = "UI"; } else uiObj = UiTransform.gameObject; uiObj.AddComponent(); return uiObj.transform; } public void Destroy() { } } }