12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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<UiManager>();
- return uiObj.transform;
- }
- public void Destroy()
- {
-
- }
- }
- }
|