GameModule

GameModule
This commit is contained in:
ALEXTANG
2023-04-04 12:56:17 +08:00
parent 8b164173ac
commit fd2bc3e2b1
52 changed files with 154 additions and 154 deletions

View File

@@ -7,8 +7,8 @@ using UnityEngine;
namespace TEngine.Editor.Inspector namespace TEngine.Editor.Inspector
{ {
[CustomEditor(typeof(MemoryPoolComponent))] [CustomEditor(typeof(MemoryPoolModule))]
internal sealed class MemoryPoolComponentInspector : GameFrameworkInspector internal sealed class MemoryPoolModuleInspector : GameFrameworkInspector
{ {
private readonly Dictionary<string, List<MemoryPoolInfo>> m_MemoryPoolInfos = new Dictionary<string, List<MemoryPoolInfo>>(StringComparer.Ordinal); private readonly Dictionary<string, List<MemoryPoolInfo>> m_MemoryPoolInfos = new Dictionary<string, List<MemoryPoolInfo>>(StringComparer.Ordinal);
private readonly HashSet<string> m_OpenedItems = new HashSet<string>(); private readonly HashSet<string> m_OpenedItems = new HashSet<string>();
@@ -23,7 +23,7 @@ namespace TEngine.Editor.Inspector
serializedObject.Update(); serializedObject.Update();
MemoryPoolComponent t = (MemoryPoolComponent)target; MemoryPoolModule t = (MemoryPoolModule)target;
if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject)) if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject))
{ {

View File

@@ -7,8 +7,8 @@ using UnityEngine;
namespace TEngine.Editor.Inspector namespace TEngine.Editor.Inspector
{ {
[CustomEditor(typeof(ObjectPoolComponent))] [CustomEditor(typeof(ObjectPoolModule))]
internal sealed class ObjectPoolComponentInspector : GameFrameworkInspector internal sealed class ObjectPoolModuleInspector : GameFrameworkInspector
{ {
private readonly HashSet<string> m_OpenedItems = new HashSet<string>(); private readonly HashSet<string> m_OpenedItems = new HashSet<string>();
@@ -22,7 +22,7 @@ namespace TEngine.Editor.Inspector
return; return;
} }
ObjectPoolComponent t = (ObjectPoolComponent)target; ObjectPoolModule t = (ObjectPoolModule)target;
if (IsPrefabInHierarchy(t.gameObject)) if (IsPrefabInHierarchy(t.gameObject))
{ {

View File

@@ -3,8 +3,8 @@ using UnityEngine;
namespace TEngine.Editor.Inspector namespace TEngine.Editor.Inspector
{ {
[CustomEditor(typeof(SettingComponent))] [CustomEditor(typeof(SettingModule))]
internal sealed class SettingComponentInspector : GameFrameworkInspector internal sealed class SettingModuleInspector : GameFrameworkInspector
{ {
private HelperInfo<SettingHelperBase> m_SettingHelperInfo = new HelperInfo<SettingHelperBase>("Setting"); private HelperInfo<SettingHelperBase> m_SettingHelperInfo = new HelperInfo<SettingHelperBase>("Setting");
@@ -12,7 +12,7 @@ namespace TEngine.Editor.Inspector
{ {
base.OnInspectorGUI(); base.OnInspectorGUI();
SettingComponent t = (SettingComponent)target; SettingModule t = (SettingModule)target;
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode); EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
{ {

View File

@@ -5,25 +5,25 @@ using UnityEngine.Rendering;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class EnvironmentInformationWindow : ScrollableDebuggerWindowBase private sealed class EnvironmentInformationWindow : ScrollableDebuggerWindowBase
{ {
private RootModule _mRootModule = null; private RootModule _mRootModule = null;
private ResourceComponent m_ResourceComponent = null; private ResourceModuleBase _mResourceModuleBase = null;
public override void Initialize(params object[] args) public override void Initialize(params object[] args)
{ {
_mRootModule = GameEntry.GetComponent<RootModule>(); _mRootModule = GameEntry.GetModule<RootModule>();
if (_mRootModule == null) if (_mRootModule == null)
{ {
Log.Fatal("Base component is invalid."); Log.Fatal("Base component is invalid.");
return; return;
} }
m_ResourceComponent = GameEntry.GetComponent<ResourceComponent>(); _mResourceModuleBase = GameEntry.GetModule<ResourceModuleBase>();
if (m_ResourceComponent == null) if (_mResourceModuleBase == null)
{ {
Log.Fatal("Resource component is invalid."); Log.Fatal("Resource component is invalid.");
return; return;
@@ -44,7 +44,7 @@ namespace TEngine
#endif #endif
DrawItem("Game Framework Version", Version.GameFrameworkVersion); DrawItem("Game Framework Version", Version.GameFrameworkVersion);
DrawItem("Game Version", Utility.Text.Format("{0} ({1})", Version.GameVersion, Version.InternalGameVersion)); DrawItem("Game Version", Utility.Text.Format("{0} ({1})", Version.GameVersion, Version.InternalGameVersion));
DrawItem("Resource Version", (string.IsNullOrEmpty(m_ResourceComponent.ApplicableGameVersion) ? "Unknown" : Utility.Text.Format("{0} ({1})", m_ResourceComponent.ApplicableGameVersion, m_ResourceComponent.InternalResourceVersion))); DrawItem("Resource Version", (string.IsNullOrEmpty(_mResourceModuleBase.ApplicableGameVersion) ? "Unknown" : Utility.Text.Format("{0} ({1})", _mResourceModuleBase.ApplicableGameVersion, _mResourceModuleBase.InternalResourceVersion)));
DrawItem("Application Version", Application.version); DrawItem("Application Version", Application.version);
DrawItem("Unity Version", Application.unityVersion); DrawItem("Unity Version", Application.unityVersion);
DrawItem("Platform", Application.platform.ToString()); DrawItem("Platform", Application.platform.ToString());

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class GraphicsInformationWindow : ScrollableDebuggerWindowBase private sealed class GraphicsInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputAccelerationInformationWindow : ScrollableDebuggerWindowBase private sealed class InputAccelerationInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputCompassInformationWindow : ScrollableDebuggerWindowBase private sealed class InputCompassInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputGyroscopeInformationWindow : ScrollableDebuggerWindowBase private sealed class InputGyroscopeInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputLocationInformationWindow : ScrollableDebuggerWindowBase private sealed class InputLocationInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputSummaryInformationWindow : ScrollableDebuggerWindowBase private sealed class InputSummaryInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class InputTouchInformationWindow : ScrollableDebuggerWindowBase private sealed class InputTouchInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
/// <summary> /// <summary>
/// 日志记录结点。 /// 日志记录结点。

View File

@@ -4,7 +4,7 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class MemoryPoolPoolInformationWindow : ScrollableDebuggerWindowBase private sealed class MemoryPoolPoolInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
// //
// namespace TEngine // namespace TEngine
// { // {
// public sealed partial class DebuggerModule : GameFrameworkComponent // public sealed partial class DebuggerModule : GameFrameworkModuleBase
// { // {
// private sealed class NetworkInformationWindow : ScrollableDebuggerWindowBase // private sealed class NetworkInformationWindow : ScrollableDebuggerWindowBase
// { // {

View File

@@ -2,16 +2,16 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class ObjectPoolInformationWindow : ScrollableDebuggerWindowBase private sealed class ObjectPoolInformationWindow : ScrollableDebuggerWindowBase
{ {
private ObjectPoolComponent m_ObjectPoolComponent = null; private ObjectPoolModule _mObjectPoolModule = null;
public override void Initialize(params object[] args) public override void Initialize(params object[] args)
{ {
m_ObjectPoolComponent = GameEntry.GetComponent<ObjectPoolComponent>(); _mObjectPoolModule = GameEntry.GetModule<ObjectPoolModule>();
if (m_ObjectPoolComponent == null) if (_mObjectPoolModule == null)
{ {
Log.Fatal("Object pool component is invalid."); Log.Fatal("Object pool component is invalid.");
return; return;
@@ -23,10 +23,10 @@ namespace TEngine
GUILayout.Label("<b>Object Pool Information</b>"); GUILayout.Label("<b>Object Pool Information</b>");
GUILayout.BeginVertical("box"); GUILayout.BeginVertical("box");
{ {
DrawItem("Object Pool Count", m_ObjectPoolComponent.Count.ToString()); DrawItem("Object Pool Count", _mObjectPoolModule.Count.ToString());
} }
GUILayout.EndVertical(); GUILayout.EndVertical();
ObjectPoolBase[] objectPools = m_ObjectPoolComponent.GetAllObjectPools(true); ObjectPoolBase[] objectPools = _mObjectPoolModule.GetAllObjectPools(true);
for (int i = 0; i < objectPools.Length; i++) for (int i = 0; i < objectPools.Length; i++)
{ {
DrawObjectPool(objectPools[i]); DrawObjectPool(objectPools[i]);

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class OperationsWindow : ScrollableDebuggerWindowBase private sealed class OperationsWindow : ScrollableDebuggerWindowBase
{ {
@@ -11,21 +11,21 @@ namespace TEngine
GUILayout.Label("<b>Operations</b>"); GUILayout.Label("<b>Operations</b>");
GUILayout.BeginVertical("box"); GUILayout.BeginVertical("box");
{ {
ObjectPoolComponent objectPoolComponent = GameEntry.GetComponent<ObjectPoolComponent>(); ObjectPoolModule objectPoolModule = GameEntry.GetModule<ObjectPoolModule>();
if (objectPoolComponent != null) if (objectPoolModule != null)
{ {
if (GUILayout.Button("Object Pool Release", GUILayout.Height(30f))) if (GUILayout.Button("Object Pool Release", GUILayout.Height(30f)))
{ {
objectPoolComponent.Release(); objectPoolModule.Release();
} }
if (GUILayout.Button("Object Pool Release All Unused", GUILayout.Height(30f))) if (GUILayout.Button("Object Pool Release All Unused", GUILayout.Height(30f)))
{ {
objectPoolComponent.ReleaseAllUnused(); objectPoolModule.ReleaseAllUnused();
} }
} }
ResourceComponent resourceCompoent = GameEntry.GetComponent<ResourceComponent>(); ResourceModuleBase resourceCompoent = GameEntry.GetModule<ResourceModuleBase>();
if (resourceCompoent != null) if (resourceCompoent != null)
{ {
if (GUILayout.Button("Unload Unused Assets", GUILayout.Height(30f))) if (GUILayout.Button("Unload Unused Assets", GUILayout.Height(30f)))

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class PathInformationWindow : ScrollableDebuggerWindowBase private sealed class PathInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -5,7 +5,7 @@ using UnityEngine.Profiling;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class ProfilerInformationWindow : ScrollableDebuggerWindowBase private sealed class ProfilerInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class QualityInformationWindow : ScrollableDebuggerWindowBase private sealed class QualityInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -1,6 +1,6 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed partial class RuntimeMemoryInformationWindow<T> : ScrollableDebuggerWindowBase where T : UnityEngine.Object private sealed partial class RuntimeMemoryInformationWindow<T> : ScrollableDebuggerWindowBase where T : UnityEngine.Object
{ {

View File

@@ -7,7 +7,7 @@ using UnityEngine.Profiling;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed partial class RuntimeMemoryInformationWindow<T> : ScrollableDebuggerWindowBase where T : UnityEngine.Object private sealed partial class RuntimeMemoryInformationWindow<T> : ScrollableDebuggerWindowBase where T : UnityEngine.Object
{ {

View File

@@ -1,6 +1,6 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed partial class RuntimeMemorySummaryWindow : ScrollableDebuggerWindowBase private sealed partial class RuntimeMemorySummaryWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -7,7 +7,7 @@ using UnityEngine.Profiling;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed partial class RuntimeMemorySummaryWindow : ScrollableDebuggerWindowBase private sealed partial class RuntimeMemorySummaryWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -3,7 +3,7 @@ using UnityEngine.SceneManagement;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class SceneInformationWindow : ScrollableDebuggerWindowBase private sealed class SceneInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class ScreenInformationWindow : ScrollableDebuggerWindowBase private sealed class ScreenInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private abstract class ScrollableDebuggerWindowBase : IDebuggerWindow private abstract class ScrollableDebuggerWindowBase : IDebuggerWindow
{ {

View File

@@ -2,12 +2,12 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class SettingsWindow : ScrollableDebuggerWindowBase private sealed class SettingsWindow : ScrollableDebuggerWindowBase
{ {
private DebuggerModule _mDebuggerModule = null; private DebuggerModule _mDebuggerModule = null;
private SettingComponent m_SettingComponent = null; private SettingModule _mSettingModule = null;
private float m_LastIconX = 0f; private float m_LastIconX = 0f;
private float m_LastIconY = 0f; private float m_LastIconY = 0f;
private float m_LastWindowX = 0f; private float m_LastWindowX = 0f;
@@ -18,27 +18,27 @@ namespace TEngine
public override void Initialize(params object[] args) public override void Initialize(params object[] args)
{ {
_mDebuggerModule = GameEntry.GetComponent<DebuggerModule>(); _mDebuggerModule = GameEntry.GetModule<DebuggerModule>();
if (_mDebuggerModule == null) if (_mDebuggerModule == null)
{ {
Log.Fatal("Debugger component is invalid."); Log.Fatal("Debugger component is invalid.");
return; return;
} }
m_SettingComponent = GameEntry.GetComponent<SettingComponent>(); _mSettingModule = GameEntry.GetModule<SettingModule>();
if (m_SettingComponent == null) if (_mSettingModule == null)
{ {
Log.Fatal("Setting component is invalid."); Log.Fatal("Setting component is invalid.");
return; return;
} }
m_LastIconX = m_SettingComponent.GetFloat("Debugger.Icon.X", DefaultIconRect.x); m_LastIconX = _mSettingModule.GetFloat("Debugger.Icon.X", DefaultIconRect.x);
m_LastIconY = m_SettingComponent.GetFloat("Debugger.Icon.Y", DefaultIconRect.y); m_LastIconY = _mSettingModule.GetFloat("Debugger.Icon.Y", DefaultIconRect.y);
m_LastWindowX = m_SettingComponent.GetFloat("Debugger.Window.X", DefaultWindowRect.x); m_LastWindowX = _mSettingModule.GetFloat("Debugger.Window.X", DefaultWindowRect.x);
m_LastWindowY = m_SettingComponent.GetFloat("Debugger.Window.Y", DefaultWindowRect.y); m_LastWindowY = _mSettingModule.GetFloat("Debugger.Window.Y", DefaultWindowRect.y);
m_LastWindowWidth = m_SettingComponent.GetFloat("Debugger.Window.Width", DefaultWindowRect.width); m_LastWindowWidth = _mSettingModule.GetFloat("Debugger.Window.Width", DefaultWindowRect.width);
m_LastWindowHeight = m_SettingComponent.GetFloat("Debugger.Window.Height", DefaultWindowRect.height); m_LastWindowHeight = _mSettingModule.GetFloat("Debugger.Window.Height", DefaultWindowRect.height);
_mDebuggerModule.WindowScale = m_LastWindowScale = m_SettingComponent.GetFloat("Debugger.Window.Scale", DefaultWindowScale); _mDebuggerModule.WindowScale = m_LastWindowScale = _mSettingModule.GetFloat("Debugger.Window.Scale", DefaultWindowScale);
_mDebuggerModule.IconRect = new Rect(m_LastIconX, m_LastIconY, DefaultIconRect.width, DefaultIconRect.height); _mDebuggerModule.IconRect = new Rect(m_LastIconX, m_LastIconY, DefaultIconRect.width, DefaultIconRect.height);
_mDebuggerModule.WindowRect = new Rect(m_LastWindowX, m_LastWindowY, m_LastWindowWidth, m_LastWindowHeight); _mDebuggerModule.WindowRect = new Rect(m_LastWindowX, m_LastWindowY, m_LastWindowWidth, m_LastWindowHeight);
} }
@@ -48,43 +48,43 @@ namespace TEngine
if (m_LastIconX != _mDebuggerModule.IconRect.x) if (m_LastIconX != _mDebuggerModule.IconRect.x)
{ {
m_LastIconX = _mDebuggerModule.IconRect.x; m_LastIconX = _mDebuggerModule.IconRect.x;
m_SettingComponent.SetFloat("Debugger.Icon.X", _mDebuggerModule.IconRect.x); _mSettingModule.SetFloat("Debugger.Icon.X", _mDebuggerModule.IconRect.x);
} }
if (m_LastIconY != _mDebuggerModule.IconRect.y) if (m_LastIconY != _mDebuggerModule.IconRect.y)
{ {
m_LastIconY = _mDebuggerModule.IconRect.y; m_LastIconY = _mDebuggerModule.IconRect.y;
m_SettingComponent.SetFloat("Debugger.Icon.Y", _mDebuggerModule.IconRect.y); _mSettingModule.SetFloat("Debugger.Icon.Y", _mDebuggerModule.IconRect.y);
} }
if (m_LastWindowX != _mDebuggerModule.WindowRect.x) if (m_LastWindowX != _mDebuggerModule.WindowRect.x)
{ {
m_LastWindowX = _mDebuggerModule.WindowRect.x; m_LastWindowX = _mDebuggerModule.WindowRect.x;
m_SettingComponent.SetFloat("Debugger.Window.X", _mDebuggerModule.WindowRect.x); _mSettingModule.SetFloat("Debugger.Window.X", _mDebuggerModule.WindowRect.x);
} }
if (m_LastWindowY != _mDebuggerModule.WindowRect.y) if (m_LastWindowY != _mDebuggerModule.WindowRect.y)
{ {
m_LastWindowY = _mDebuggerModule.WindowRect.y; m_LastWindowY = _mDebuggerModule.WindowRect.y;
m_SettingComponent.SetFloat("Debugger.Window.Y", _mDebuggerModule.WindowRect.y); _mSettingModule.SetFloat("Debugger.Window.Y", _mDebuggerModule.WindowRect.y);
} }
if (m_LastWindowWidth != _mDebuggerModule.WindowRect.width) if (m_LastWindowWidth != _mDebuggerModule.WindowRect.width)
{ {
m_LastWindowWidth = _mDebuggerModule.WindowRect.width; m_LastWindowWidth = _mDebuggerModule.WindowRect.width;
m_SettingComponent.SetFloat("Debugger.Window.Width", _mDebuggerModule.WindowRect.width); _mSettingModule.SetFloat("Debugger.Window.Width", _mDebuggerModule.WindowRect.width);
} }
if (m_LastWindowHeight != _mDebuggerModule.WindowRect.height) if (m_LastWindowHeight != _mDebuggerModule.WindowRect.height)
{ {
m_LastWindowHeight = _mDebuggerModule.WindowRect.height; m_LastWindowHeight = _mDebuggerModule.WindowRect.height;
m_SettingComponent.SetFloat("Debugger.Window.Height", _mDebuggerModule.WindowRect.height); _mSettingModule.SetFloat("Debugger.Window.Height", _mDebuggerModule.WindowRect.height);
} }
if (m_LastWindowScale != _mDebuggerModule.WindowScale) if (m_LastWindowScale != _mDebuggerModule.WindowScale)
{ {
m_LastWindowScale = _mDebuggerModule.WindowScale; m_LastWindowScale = _mDebuggerModule.WindowScale;
m_SettingComponent.SetFloat("Debugger.Window.Scale", _mDebuggerModule.WindowScale); _mSettingModule.SetFloat("Debugger.Window.Scale", _mDebuggerModule.WindowScale);
} }
} }

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class SystemInformationWindow : ScrollableDebuggerWindowBase private sealed class SystemInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -2,7 +2,7 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class TimeInformationWindow : ScrollableDebuggerWindowBase private sealed class TimeInformationWindow : ScrollableDebuggerWindowBase
{ {

View File

@@ -4,14 +4,14 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
[Serializable] [Serializable]
private sealed class ConsoleWindow : IDebuggerWindow private sealed class ConsoleWindow : IDebuggerWindow
{ {
private readonly Queue<LogNode> m_LogNodes = new Queue<LogNode>(); private readonly Queue<LogNode> m_LogNodes = new Queue<LogNode>();
private SettingComponent m_SettingComponent = null; private SettingModule _mSettingModule = null;
private Vector2 m_LogScrollPosition = Vector2.zero; private Vector2 m_LogScrollPosition = Vector2.zero;
private Vector2 m_StackScrollPosition = Vector2.zero; private Vector2 m_StackScrollPosition = Vector2.zero;
private int m_InfoCount = 0; private int m_InfoCount = 0;
@@ -209,19 +209,19 @@ namespace TEngine
public void Initialize(params object[] args) public void Initialize(params object[] args)
{ {
m_SettingComponent = GameEntry.GetComponent<SettingComponent>(); _mSettingModule = GameEntry.GetModule<SettingModule>();
if (m_SettingComponent == null) if (_mSettingModule == null)
{ {
Log.Fatal("Setting component is invalid."); Log.Fatal("Setting component is invalid.");
return; return;
} }
Application.logMessageReceived += OnLogMessageReceived; Application.logMessageReceived += OnLogMessageReceived;
m_LockScroll = m_LastLockScroll = m_SettingComponent.GetBool("Debugger.Console.LockScroll", true); m_LockScroll = m_LastLockScroll = _mSettingModule.GetBool("Debugger.Console.LockScroll", true);
m_InfoFilter = m_LastInfoFilter = m_SettingComponent.GetBool("Debugger.Console.InfoFilter", true); m_InfoFilter = m_LastInfoFilter = _mSettingModule.GetBool("Debugger.Console.InfoFilter", true);
m_WarningFilter = m_LastWarningFilter = m_SettingComponent.GetBool("Debugger.Console.WarningFilter", true); m_WarningFilter = m_LastWarningFilter = _mSettingModule.GetBool("Debugger.Console.WarningFilter", true);
m_ErrorFilter = m_LastErrorFilter = m_SettingComponent.GetBool("Debugger.Console.ErrorFilter", true); m_ErrorFilter = m_LastErrorFilter = _mSettingModule.GetBool("Debugger.Console.ErrorFilter", true);
m_FatalFilter = m_LastFatalFilter = m_SettingComponent.GetBool("Debugger.Console.FatalFilter", true); m_FatalFilter = m_LastFatalFilter = _mSettingModule.GetBool("Debugger.Console.FatalFilter", true);
} }
public void Shutdown() public void Shutdown()
@@ -243,31 +243,31 @@ namespace TEngine
if (m_LastLockScroll != m_LockScroll) if (m_LastLockScroll != m_LockScroll)
{ {
m_LastLockScroll = m_LockScroll; m_LastLockScroll = m_LockScroll;
m_SettingComponent.SetBool("Debugger.Console.LockScroll", m_LockScroll); _mSettingModule.SetBool("Debugger.Console.LockScroll", m_LockScroll);
} }
if (m_LastInfoFilter != m_InfoFilter) if (m_LastInfoFilter != m_InfoFilter)
{ {
m_LastInfoFilter = m_InfoFilter; m_LastInfoFilter = m_InfoFilter;
m_SettingComponent.SetBool("Debugger.Console.InfoFilter", m_InfoFilter); _mSettingModule.SetBool("Debugger.Console.InfoFilter", m_InfoFilter);
} }
if (m_LastWarningFilter != m_WarningFilter) if (m_LastWarningFilter != m_WarningFilter)
{ {
m_LastWarningFilter = m_WarningFilter; m_LastWarningFilter = m_WarningFilter;
m_SettingComponent.SetBool("Debugger.Console.WarningFilter", m_WarningFilter); _mSettingModule.SetBool("Debugger.Console.WarningFilter", m_WarningFilter);
} }
if (m_LastErrorFilter != m_ErrorFilter) if (m_LastErrorFilter != m_ErrorFilter)
{ {
m_LastErrorFilter = m_ErrorFilter; m_LastErrorFilter = m_ErrorFilter;
m_SettingComponent.SetBool("Debugger.Console.ErrorFilter", m_ErrorFilter); _mSettingModule.SetBool("Debugger.Console.ErrorFilter", m_ErrorFilter);
} }
if (m_LastFatalFilter != m_FatalFilter) if (m_LastFatalFilter != m_FatalFilter)
{ {
m_LastFatalFilter = m_FatalFilter; m_LastFatalFilter = m_FatalFilter;
m_SettingComponent.SetBool("Debugger.Console.FatalFilter", m_FatalFilter); _mSettingModule.SetBool("Debugger.Console.FatalFilter", m_FatalFilter);
} }
} }

View File

@@ -1,6 +1,6 @@
namespace TEngine namespace TEngine
{ {
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
private sealed class FpsCounter private sealed class FpsCounter
{ {

View File

@@ -8,7 +8,7 @@ namespace TEngine
/// 调试器组件。 /// 调试器组件。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed partial class DebuggerModule : GameFrameworkComponent public sealed partial class DebuggerModule : GameFrameworkModuleBase
{ {
/// <summary> /// <summary>
/// 默认调试器漂浮框大小。 /// 默认调试器漂浮框大小。
@@ -154,7 +154,7 @@ namespace TEngine
} }
} }
private SettingComponent m_SettingComponent = null; private SettingModule _mSettingModule = null;
/// <summary> /// <summary>
/// 游戏框架组件初始化。 /// 游戏框架组件初始化。
@@ -172,33 +172,33 @@ namespace TEngine
m_FpsCounter = new FpsCounter(0.5f); m_FpsCounter = new FpsCounter(0.5f);
m_SettingComponent = GameEntry.GetComponent<SettingComponent>(); _mSettingModule = GameEntry.GetModule<SettingModule>();
if (m_SettingComponent == null) if (_mSettingModule == null)
{ {
Log.Fatal("Setting component is invalid."); Log.Fatal("Setting component is invalid.");
return; return;
} }
var lastIconX = m_SettingComponent.GetFloat("Debugger.Icon.X", DefaultIconRect.x); var lastIconX = _mSettingModule.GetFloat("Debugger.Icon.X", DefaultIconRect.x);
var lastIconY = m_SettingComponent.GetFloat("Debugger.Icon.Y", DefaultIconRect.y); var lastIconY = _mSettingModule.GetFloat("Debugger.Icon.Y", DefaultIconRect.y);
var lastWindowX = m_SettingComponent.GetFloat("Debugger.Window.X", DefaultWindowRect.x); var lastWindowX = _mSettingModule.GetFloat("Debugger.Window.X", DefaultWindowRect.x);
var lastWindowY = m_SettingComponent.GetFloat("Debugger.Window.Y", DefaultWindowRect.y); var lastWindowY = _mSettingModule.GetFloat("Debugger.Window.Y", DefaultWindowRect.y);
var lastWindowWidth = m_SettingComponent.GetFloat("Debugger.Window.Width", DefaultWindowRect.width); var lastWindowWidth = _mSettingModule.GetFloat("Debugger.Window.Width", DefaultWindowRect.width);
var lastWindowHeight = m_SettingComponent.GetFloat("Debugger.Window.Height", DefaultWindowRect.height); var lastWindowHeight = _mSettingModule.GetFloat("Debugger.Window.Height", DefaultWindowRect.height);
m_WindowScale = m_SettingComponent.GetFloat("Debugger.Window.Scale", DefaultWindowScale); m_WindowScale = _mSettingModule.GetFloat("Debugger.Window.Scale", DefaultWindowScale);
m_WindowRect = new Rect(lastIconX, lastIconY, DefaultIconRect.width, DefaultIconRect.height); m_WindowRect = new Rect(lastIconX, lastIconY, DefaultIconRect.width, DefaultIconRect.height);
m_WindowRect = new Rect(lastWindowX, lastWindowY, lastWindowWidth, lastWindowHeight); m_WindowRect = new Rect(lastWindowX, lastWindowY, lastWindowWidth, lastWindowHeight);
} }
private void OnDestroy() private void OnDestroy()
{ {
if (m_SettingComponent == null) if (_mSettingModule == null)
{ {
Log.Fatal("Setting component is invalid."); Log.Fatal("Setting component is invalid.");
return; return;
} }
m_SettingComponent.Save(); _mSettingModule.Save();
} }
private void Start() private void Start()

View File

@@ -8,7 +8,7 @@ namespace TEngine
/// 有限状态机模块。 /// 有限状态机模块。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed class FsmModule : GameFrameworkComponent public sealed class FsmModule : GameFrameworkModuleBase
{ {
private IFsmManager m_FsmManager = null; private IFsmManager m_FsmManager = null;

View File

@@ -10,7 +10,7 @@ namespace TEngine
/// </summary> /// </summary>
public static class GameEntry public static class GameEntry
{ {
private static readonly GameFrameworkLinkedList<GameFrameworkComponent> s_GameFrameworkComponents = new GameFrameworkLinkedList<GameFrameworkComponent>(); private static readonly GameFrameworkLinkedList<GameFrameworkModuleBase> s_GameFrameworkModules = new GameFrameworkLinkedList<GameFrameworkModuleBase>();
/// <summary> /// <summary>
/// 游戏框架所在的场景编号。 /// 游戏框架所在的场景编号。
@@ -18,23 +18,23 @@ namespace TEngine
internal const int GameFrameworkSceneId = 0; internal const int GameFrameworkSceneId = 0;
/// <summary> /// <summary>
/// 获取游戏框架组件 /// 获取游戏框架模块
/// </summary> /// </summary>
/// <typeparam name="T">要获取的游戏框架组件类型。</typeparam> /// <typeparam name="T">要获取的游戏框架组件类型。</typeparam>
/// <returns>要获取的游戏框架组件。</returns> /// <returns>要获取的游戏框架组件。</returns>
public static T GetComponent<T>() where T : GameFrameworkComponent public static T GetModule<T>() where T : GameFrameworkModuleBase
{ {
return (T)GetComponent(typeof(T)); return (T)GetModule(typeof(T));
} }
/// <summary> /// <summary>
/// 获取游戏框架组件 /// 获取游戏框架模块
/// </summary> /// </summary>
/// <param name="type">要获取的游戏框架组件类型。</param> /// <param name="type">要获取的游戏框架组件类型。</param>
/// <returns>要获取的游戏框架组件。</returns> /// <returns>要获取的游戏框架组件。</returns>
public static GameFrameworkComponent GetComponent(Type type) public static GameFrameworkModuleBase GetModule(Type type)
{ {
LinkedListNode<GameFrameworkComponent> current = s_GameFrameworkComponents.First; LinkedListNode<GameFrameworkModuleBase> current = s_GameFrameworkModules.First;
while (current != null) while (current != null)
{ {
if (current.Value.GetType() == type) if (current.Value.GetType() == type)
@@ -49,13 +49,13 @@ namespace TEngine
} }
/// <summary> /// <summary>
/// 获取游戏框架组件 /// 获取游戏框架模块
/// </summary> /// </summary>
/// <param name="typeName">要获取的游戏框架组件类型名称。</param> /// <param name="typeName">要获取的游戏框架组件类型名称。</param>
/// <returns>要获取的游戏框架组件。</returns> /// <returns>要获取的游戏框架组件。</returns>
public static GameFrameworkComponent GetComponent(string typeName) public static GameFrameworkModuleBase GetModule(string typeName)
{ {
LinkedListNode<GameFrameworkComponent> current = s_GameFrameworkComponents.First; LinkedListNode<GameFrameworkModuleBase> current = s_GameFrameworkModules.First;
while (current != null) while (current != null)
{ {
Type type = current.Value.GetType(); Type type = current.Value.GetType();
@@ -78,14 +78,14 @@ namespace TEngine
{ {
Log.Info("Shutdown Game Framework ({0})...", shutdownType); Log.Info("Shutdown Game Framework ({0})...", shutdownType);
Utility.Unity.Release(); Utility.Unity.Release();
RootModule rootModule = GetComponent<RootModule>(); RootModule rootModule = GetModule<RootModule>();
if (rootModule != null) if (rootModule != null)
{ {
rootModule.Shutdown(); rootModule.Shutdown();
rootModule = null; rootModule = null;
} }
s_GameFrameworkComponents.Clear(); s_GameFrameworkModules.Clear();
if (shutdownType == ShutdownType.None) if (shutdownType == ShutdownType.None)
{ {
@@ -108,20 +108,20 @@ namespace TEngine
} }
/// <summary> /// <summary>
/// 注册游戏框架组件 /// 注册游戏框架模块
/// </summary> /// </summary>
/// <param name="gameFrameworkComponent">要注册的游戏框架组件。</param> /// <param name="gameFrameworkModule">要注册的游戏框架模块。</param>
internal static void RegisterComponent(GameFrameworkComponent gameFrameworkComponent) internal static void RegisterModule(GameFrameworkModuleBase gameFrameworkModule)
{ {
if (gameFrameworkComponent == null) if (gameFrameworkModule == null)
{ {
Log.Error("Game Framework component is invalid."); Log.Error("Game Framework component is invalid.");
return; return;
} }
Type type = gameFrameworkComponent.GetType(); Type type = gameFrameworkModule.GetType();
LinkedListNode<GameFrameworkComponent> current = s_GameFrameworkComponents.First; LinkedListNode<GameFrameworkModuleBase> current = s_GameFrameworkModules.First;
while (current != null) while (current != null)
{ {
if (current.Value.GetType() == type) if (current.Value.GetType() == type)
@@ -133,7 +133,7 @@ namespace TEngine
current = current.Next; current = current.Next;
} }
s_GameFrameworkComponents.AddLast(gameFrameworkComponent); s_GameFrameworkModules.AddLast(gameFrameworkModule);
} }
} }
} }

View File

@@ -5,14 +5,14 @@ namespace TEngine
/// <summary> /// <summary>
/// 游戏框架组件抽象类。 /// 游戏框架组件抽象类。
/// </summary> /// </summary>
public abstract class GameFrameworkComponent : MonoBehaviour public abstract class GameFrameworkModuleBase : MonoBehaviour
{ {
/// <summary> /// <summary>
/// 游戏框架组件初始化。 /// 游戏框架组件初始化。
/// </summary> /// </summary>
protected virtual void Awake() protected virtual void Awake()
{ {
GameEntry.RegisterComponent(this); GameEntry.RegisterModule(this);
} }
} }
} }

View File

@@ -32,7 +32,7 @@ namespace TEngine
/// 基础组件。 /// 基础组件。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed class MemoryPoolComponent : GameFrameworkComponent public sealed class MemoryPoolModule : GameFrameworkModuleBase
{ {
[SerializeField] [SerializeField]
private MemoryStrictCheckType m_EnableStrictCheck = MemoryStrictCheckType.AlwaysEnable; private MemoryStrictCheckType m_EnableStrictCheck = MemoryStrictCheckType.AlwaysEnable;

View File

@@ -8,7 +8,7 @@ namespace TEngine
/// 对象池组件。 /// 对象池组件。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed class ObjectPoolComponent : GameFrameworkComponent public sealed class ObjectPoolModule : GameFrameworkModuleBase
{ {
private IObjectPoolManager m_ObjectPoolManager = null; private IObjectPoolManager m_ObjectPoolManager = null;

View File

@@ -4,7 +4,7 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class ResourceComponent: GameFrameworkComponent public class ResourceModuleBase: GameFrameworkModuleBase
{ {
private IResourceManager m_ResourceManager; private IResourceManager m_ResourceManager;

View File

@@ -8,7 +8,7 @@ namespace TEngine
/// 基础模块。 /// 基础模块。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed class RootModule : GameFrameworkComponent public sealed class RootModule : GameFrameworkModuleBase
{ {
private const int DefaultDpi = 96; // default windows dpi private const int DefaultDpi = 96; // default windows dpi
@@ -318,16 +318,16 @@ namespace TEngine
{ {
Log.Warning("Low memory reported..."); Log.Warning("Low memory reported...");
ObjectPoolComponent objectPoolComponent = GameEntry.GetComponent<ObjectPoolComponent>(); ObjectPoolModule objectPoolModule = GameEntry.GetModule<ObjectPoolModule>();
if (objectPoolComponent != null) if (objectPoolModule != null)
{ {
objectPoolComponent.ReleaseAllUnused(); objectPoolModule.ReleaseAllUnused();
} }
ResourceComponent resourceComponent = GameEntry.GetComponent<ResourceComponent>(); ResourceModuleBase resourceModuleBase = GameEntry.GetModule<ResourceModuleBase>();
if (resourceComponent != null) if (resourceModuleBase != null)
{ {
resourceComponent.ForceUnloadUnusedAssets(true); resourceModuleBase.ForceUnloadUnusedAssets(true);
} }
} }
} }

View File

@@ -8,7 +8,7 @@ namespace TEngine
/// 游戏配置组件。 /// 游戏配置组件。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed class SettingComponent : GameFrameworkComponent public sealed class SettingModule : GameFrameworkModuleBase
{ {
private ISettingManager m_SettingManager = null; private ISettingManager m_SettingManager = null;

View File

@@ -7,7 +7,7 @@ namespace TEngine
/// </summary> /// </summary>
public class DefaultUIWindowHelper : UIWindowHelperBase public class DefaultUIWindowHelper : UIWindowHelperBase
{ {
private ResourceComponent m_ResourceComponent = null; private ResourceModuleBase _mResourceModuleBase = null;
private Vector2 m_Half = new Vector2(0.5f,0.5f); private Vector2 m_Half = new Vector2(0.5f,0.5f);
@@ -16,8 +16,8 @@ namespace TEngine
private void Start() private void Start()
{ {
m_UILayer = LayerMask.NameToLayer("UI"); m_UILayer = LayerMask.NameToLayer("UI");
m_ResourceComponent = GameEntry.GetComponent<ResourceComponent>(); _mResourceModuleBase = GameEntry.GetModule<ResourceModuleBase>();
if (m_ResourceComponent == null) if (_mResourceModuleBase == null)
{ {
Log.Fatal("Resource component is invalid."); Log.Fatal("Resource component is invalid.");
return; return;

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace TEngine namespace TEngine
{ {
public sealed partial class UIModule : GameFrameworkComponent public sealed partial class UIModule : GameFrameworkModuleBase
{ {
[Serializable] [Serializable]
private sealed class UIGroup private sealed class UIGroup

View File

@@ -19,7 +19,7 @@ namespace TEngine
/// UI模块。 /// UI模块。
/// </summary> /// </summary>
[DisallowMultipleComponent] [DisallowMultipleComponent]
public sealed partial class UIModule : GameFrameworkComponent public sealed partial class UIModule : GameFrameworkModuleBase
{ {
private const int DefaultPriority = 0; private const int DefaultPriority = 0;
@@ -63,7 +63,7 @@ namespace TEngine
private void Start() private void Start()
{ {
RootModule rootModule = GameEntry.GetComponent<RootModule>(); RootModule rootModule = GameEntry.GetModule<RootModule>();
if (rootModule == null) if (rootModule == null)
{ {
Log.Fatal("Base component is invalid."); Log.Fatal("Base component is invalid.");

View File

@@ -8,7 +8,7 @@ using UnityEngine;
/// </summary> /// </summary>
public class GameModule:MonoBehaviour public class GameModule:MonoBehaviour
{ {
#region BaseComponents #region BaseModules
/// <summary> /// <summary>
/// 获取游戏基础模块。 /// 获取游戏基础模块。
/// </summary> /// </summary>
@@ -27,17 +27,17 @@ public class GameModule:MonoBehaviour
/// <summary> /// <summary>
/// 获取对象池模块。 /// 获取对象池模块。
/// </summary> /// </summary>
public static ObjectPoolComponent ObjectPool { get; private set; } public static ObjectPoolModule ObjectPool { get; private set; }
/// <summary> /// <summary>
/// 获取资源模块。 /// 获取资源模块。
/// </summary> /// </summary>
public static ResourceComponent Resource { get; private set; } public static ResourceModuleBase Resource { get; private set; }
/// <summary> /// <summary>
/// 获取配置模块。 /// 获取配置模块。
/// </summary> /// </summary>
public static SettingComponent Setting { get; private set; } public static SettingModule Setting { get; private set; }
/// <summary> /// <summary>
/// 获取UI模块。 /// 获取UI模块。
@@ -49,46 +49,46 @@ public class GameModule:MonoBehaviour
/// <summary> /// <summary>
/// 初始化系统框架模块 /// 初始化系统框架模块
/// </summary> /// </summary>
public static void InitFrameWorkComponents() public static void InitFrameWorkModules()
{ {
Base = Get<RootModule>(); Base = Get<RootModule>();
Debugger = Get<DebuggerModule>(); Debugger = Get<DebuggerModule>();
Fsm = Get<FsmModule>(); Fsm = Get<FsmModule>();
ObjectPool = Get<ObjectPoolComponent>(); ObjectPool = Get<ObjectPoolModule>();
Resource = Get<ResourceComponent>(); Resource = Get<ResourceModuleBase>();
Setting = Get<SettingComponent>(); Setting = Get<SettingModule>();
UI = Get<UIModule>(); UI = Get<UIModule>();
} }
public static void InitCustomComponents() public static void InitCustomModules()
{ {
} }
private static readonly Dictionary<Type, GameFrameworkComponent> s_Components = new Dictionary<Type, GameFrameworkComponent>(); private static readonly Dictionary<Type, GameFrameworkModuleBase> Modules = new Dictionary<Type, GameFrameworkModuleBase>();
public static T Get<T>()where T : GameFrameworkComponent public static T Get<T>()where T : GameFrameworkModuleBase
{ {
Type type = typeof(T); Type type = typeof(T);
if (s_Components.ContainsKey(type)) if (Modules.ContainsKey(type))
{ {
return s_Components[type] as T; return Modules[type] as T;
} }
T component = TEngine.GameEntry.GetComponent<T>(); T module = TEngine.GameEntry.GetModule<T>();
Log.Assert(condition:component != null,$"{typeof(T)} is null"); Log.Assert(condition:module != null,$"{typeof(T)} is null");
s_Components.Add(type,component); Modules.Add(type,module);
return component; return module;
} }
public void Start() public void Start()
{ {
Log.Info("GameModule Active"); Log.Info("GameModule Active");
InitFrameWorkComponents(); InitFrameWorkModules();
InitCustomComponents(); InitCustomModules();
} }
} }