mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Fix SettingComponent
Fix SettingComponent
This commit is contained in:
@@ -62,15 +62,17 @@ namespace TEngine.Runtime
|
||||
if (settingHelper != null)
|
||||
{
|
||||
m_SettingManager.SetSettingHelper(settingHelper);
|
||||
|
||||
if (!m_SettingManager.Load())
|
||||
{
|
||||
Log.Error("Load settings failure.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (!m_SettingManager.Load())
|
||||
{
|
||||
Log.Error("Load settings failure.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -316,5 +318,11 @@ namespace TEngine.Runtime
|
||||
{
|
||||
m_SettingManager.SetObject(settingName, obj);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
this.Save();
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user