microsoft / xbox-live-unity-plugin

The Xbox Live Unity Plugin provides a way for developers in the Xbox Live Creators Program to quickly and easily integrate Xbox Live functionality into their Unity based game. For ID@Xbox developers, this Xbox Live Unity Plugin does not yet support all the features you will need. Instead, contact your Microsoft representative.
MIT License
167 stars 62 forks source link

do NOT use this package for id@xbox features! #338

Open quabug opened 1 year ago

quabug commented 1 year ago

They are not implemented!

To save your ass, PLEASE use one of package from Microsoft.Xbox.Live.SDK.WinRT.UWP.

// sign in
object dispatcher = null;
#if ENABLE_WINMD_SUPPORT
dispatcher = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
#endif
var user = new XboxLiveUser();
var result = await user.SignInSilentlyAsync(dispatcher);
if (result.Status == SignInStatus.UserInteractionRequired)
    await user.SignInAsync(dispatcher);

// create xbox live context
var context = new XboxLiveContext(user);

// achievement
var result = await context.AchievementService.GetAchievementsForTitleIdAsync(
    xboxUserId: context.User.XboxUserId,
    titleId: context.AppConfig.TitleId,
    Microsoft.Xbox.Services.Achievements.AchievementType.All,
    unlockedOnly: false,
    orderBy: AchievementOrderBy.Default,
    skipItems: 0,
    maxItems: 100 // do NOT use MaxValue!
);

use VS2015 to build your UWP project image

image

create and put a XboxServices.config into your UWA project

{
  "PublisherId": "CN=XXXXXXXXX",
  "PublisherDisplayName": "XXXX",
  "PackageIdentityName": "XXXX",
  "DisplayName": "XXXX",
  "AppId": "XXXX",
  "ProductFamilyName": "XXXX",
  "PrimaryServiceConfigId": "00000000-0000-0000-0000-0000XXXXXX",
  "TitleId": XXXXXX,
  "Sandbox": "XXXXX"
}

image image

associate your project to the correct store app and create cert image image

in order to connect script debugger, you also have to give private network privilege in capabilities of appxmanifest image

tayannastudios commented 1 year ago

Hi there - I'm signed up with id@xbox but am publishing via UWP on Unity because I can't afford their required Unity Pro Licence right now. Microsoft have no problem with that so that's not a concern.

Is there anyway at you you can explain to me in a simple guide how to implement Xbox Live, Achievements and Cloud Saving? I simply can't seem to grasp it at all.

Any help here would be great as I've been ripping my hair out for 3 weeks now :(