示例#1
0
 void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Debug.LogError("[KodeUILog] Instance already exists");
         Destroy(this);
         return;
     }
     Instance = this;
 }
示例#2
0
 void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
     if (fileStream != null)
     {
         fileStream.Flush();
         fileStream.Close();
     }
 }