示例#1
0
 void Awake()
 {
     if (File.Exists(RConfigPath))
     {
         configData = ConfigJSON.LoadFromJSON <ConfigData>(RConfigPath);
     }
     else
     {   // Provide a form of Config recreation either an individual template file or just create an empty when no config is available
         ConfigJSON.SaveToJSON <ConfigData>(RConfigPath, new ConfigData());
         Debug.LogError("No config data available in " + RConfigPath + " a new empty config was created please fill out the empty parameter");
         System.Console.WriteLine("No config data available in " + RConfigPath + " a new empty config was created please fill out the empty parameter");
         Application.Quit();
     }
 }