Exemplo n.º 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>();
            }
        }
Exemplo n.º 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.");
                }
            }
        }
Exemplo n.º 3
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 (Exception e)
         {
             Console.WriteLine("Could not load playfab settings file: " + e.Message);
         }
     }
 }
Exemplo n.º 4
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>();
            }
        }