using System.Collections; using System.Collections.Generic; using UnityEngine; using KairoEngine.Core.ModuleSystem; using Sirenix.OdinInspector; namespace KairoEngine.CharacterSystem { public class CharacterSystemModule : IGameModule { private string _name = "Character System Module"; public string name { get => _name; set => _name = value; } public GameObject characterGenerator; public GameObject characterManager; public void Load(Transform parent) { if(characterGenerator == null) { Debug.LogError($"Character Generator is missing in {_name}."); return; } GameObject obj1 = GameObject.Instantiate(characterGenerator, parent); obj1.name = obj1.name.Replace("(Clone)", ""); if(characterManager == null) { Debug.LogError($"Character Manager is missing in {_name}."); return; } GameObject obj2 = GameObject.Instantiate(characterManager, parent); obj2.name = obj2.name.Replace("(Clone)", ""); Debug.Log($"Loaded {_name}"); } public void Reset() { characterGenerator = null; characterManager = null; } public void Destroy() { } } }