修复版本检查非运行时异常的问题

This commit is contained in:
monitor1394
2019-10-26 05:02:57 +08:00
parent 39278499a4
commit e13049774a

View File

@@ -1,3 +1,10 @@
/******************************************/
/* */
/* Copyright (c) 2018 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/******************************************/
using System.Text; using System.Text;
using System.Collections; using System.Collections;
@@ -36,7 +43,10 @@ namespace XCharts
{ {
go = new GameObject(); go = new GameObject();
go.name = "_xcharts_"; go.name = "_xcharts_";
DontDestroyOnLoad(go); if (Application.isPlaying)
{
DontDestroyOnLoad(go);
}
m_XCharts = go.AddComponent<XChartsMgr>(); m_XCharts = go.AddComponent<XChartsMgr>();
} }
else else