예제 #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.");
                }
            }
        }
예제 #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);
         }
     }
 }
예제 #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>();
            }
        }