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