Beispiel #1
0
 void EnsureMetricsFileExists()
 {
     if (metrics == null)
     {
         metrics       = CreateInstance <GameSimMetrics>();
         metricsEditor = UnityEditor.Editor.CreateEditor(metrics);
     }
 }
Beispiel #2
0
        void OnDestroy()
        {
            if (metrics != null)
            {
                DestroyImmediate(metrics);
            }

            metrics       = null;
            metricsEditor = null;
            EditorPrefs.DeleteKey("isEntitled");
        }