示例#1
0
        public static void Init()
        {
            if (Settings == null)
            {
                Settings = new PlayFabServiceSettings();
            }

            if (Settings.StoreList == null)
            {
                Settings.StoreList = new List <string>();
            }
            if (Settings.Studios == null)
            {
                Settings.Studios = new List <Studio>();
            }
        }
示例#2
0
        public static void Load()
        {
            var path = AppDomain.CurrentDomain.BaseDirectory + "/data/";
            var file = "playfabsettings.json";

            if (Directory.Exists(path))
            {
                try
                {
                    var settings = File.ReadAllText(path + file);
                    var obj      = JsonConvert.DeserializeObject <PlayFabServiceSettings>(settings);
                    if (obj != null)
                    {
                        Settings = obj;
                    }
                } catch
                {
                    Console.WriteLine("Could not load playfab settings file.");
                }
            }
        }
 public static void Load()
 {
     var path = AppDomain.CurrentDomain.BaseDirectory + "/data/";
     var file = "playfabsettings.json";
     if (Directory.Exists(path))
     {
         try
         {
             var settings = File.ReadAllText(path + file);
             var obj = JsonConvert.DeserializeObject<PlayFabServiceSettings>(settings);
             if (obj != null)
             {
                 Settings = obj;
             }
         }
         catch (Exception e)
         {
             Console.WriteLine("Could not load playfab settings file: " + e.Message);
         }
     }
 }
        public static void Init()
        {
            if (Settings == null)
            {
                Settings = new PlayFabServiceSettings();
            }

            if (Settings.StoreList == null)
            {
                Settings.StoreList = new List<string>();
            }
            if (Settings.Studios == null)
            {
                Settings.Studios = new List<Studio>();
            }
        }