public void Awake()
    {
        // Super simple check to determine if configuration is non-empty.  This is not a thorough check to determine if the configuration is valid.
        // A user can easly bypass this check which will just cause them to fail at runtime if they try to use any functionality.
        if (XboxLiveAppConfiguration.Instance.TitleId == 0 && Application.isPlaying)
        {
            if (Application.isEditor)
            {
                Debug.LogWarning("Xbox Live is not configured, but the game is attempting to use Xbox Live functionality.  You must update the configuration in 'Xbox Live > Configuration' before building the game to enable Xbox Live.");
            }
            else
            {
                Debug.LogError("Xbox Live must be enabled.  Run the Xbox Live Association Wizard from Xbox Live > Configuration before using any Xbox Live features.");
            }
        }

        MockXboxLiveData.Load(Path.Combine(Application.dataPath, "MockData.json"));
    }
Example #2
0
    public void Start()
    {
        // Super simple check to determine if configuration is non-empty.  This is not a thorough check to determine if the configuration is valid.
        // A user can easly bypass this check which will just cause them to fail at runtime if they try to use any functionality.
        if (XboxLive.Instance.AppConfig == null || XboxLive.Instance.AppConfig.TitleId == 0 && Application.isPlaying)
        {
            const string message = "Xbox Live is not configured, but the game is attempting to use Xbox Live functionality.  You must update the configuration in 'Xbox Live > Configuration' before building the game to enable Xbox Live.";
            if (Application.isEditor && XboxLiveServicesSettings.Instance.DebugLogsOn)
            {
                Debug.LogWarning(message);
            }
            else
            {
                if (XboxLiveServicesSettings.Instance.DebugLogsOn)
                {
                    Debug.LogError(message);
                }
            }
        }

        MockXboxLiveData.Load(Path.Combine(Application.dataPath, "MockData.json"));
    }
Example #3
0
    public void Awake()
    {
        // Super simple check to determine if configuration is non-empty.  This is not a thorough check to determine if the configuration is valid.
        // A user can easly bypass this check which will just cause them to fail at runtime if they try to use any functionality.
        if (XboxLive.Instance.AppConfig == null || XboxLive.Instance.AppConfig.TitleId == 0 && Application.isPlaying)
        {
            const string message = "Xbox Live is not configured, but the game is attempting to use Xbox Live functionality.  You must update the configuration in 'Xbox Live > Configuration' before building the game to enable Xbox Live.";
            if (Application.isEditor)
            {
                Debug.LogWarning(message);
            }
            else
            {
                Debug.LogError(message);
            }
        }

        MockXboxLiveData.Load(Path.Combine(Application.dataPath, "MockData.json"));

        // TODO: Move user handling into the XboxLive class UserManager.  Until then, this class will just be used as the cache for the individual XboxLiveUser object.
        this.User = new XboxLiveUser();
    }
 public void TestInitialize()
 {
     this.user = new XboxLiveUser();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Social\\SocialUserGroupUT.json");
     SocialManager.Instance.AddLocalUser(this.user, SocialManagerExtraDetailLevel.PreferredColor).Wait();
 }
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Privacy\\MockDataForPrivacyTests.json");
 }
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Social\\SocialManagerUT.json");
 }
Example #7
0
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Leaderboards\\MockDataForLeaderboardTests.json");
     this.leaderboardService = new LeaderboardService();
 }
Example #8
0
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Social\\SocialGraphUT.json");
     this.graph = new SocialGraph(user, SocialManagerExtraDetailLevel.PreferredColor);
 }
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\TitleStorage\\TitleStorageUT.json");
     this.titleStorageService = new TitleStorageService();
 }
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Social\\PeopleHubUT.json");
     this.service = new PeopleHubService();
 }
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Leaderboards\\LeaderboardUT.json");
 }
Example #12
0
 public override void TestInitialize()
 {
     base.TestInitialize();
     MockXboxLiveData.Load(Environment.CurrentDirectory + "\\Privacy\\MockDataForPrivacyTests.json");
     this.privacyService = XboxLive.Instance.PrivacyService;
 }