question

beneton avatar image
beneton asked

Switching servers, inconsistent NewlyCreated flag

Using Unity 2017.3.0p4:

Case:
Log in to Server A with CustomID (using device ID) and CreateAccount set to true.
- Returns Successful login with flag NewlyCreated set to true.

Using the same device, Log in to Server B with CustomID (Same device ID) and CreateAccount set to true.
- Returns Successful login with flag NewlyCreated set to false.



Here you can find my logs:

Loggin in to server :: 90B5
Login Custom Id :: 0f72c4299b4f529e1d0e2e0ac2e29025f647160d
Login to :: with ID: 4E71FF9EE9B8A493 :: is new? = True
New user created! :: Id = 4E71FF9EE9B8A493

Loggin in to server :: 2D17
Login Custom Id :: 0f72c4299b4f529e1d0e2e0ac2e29025f647160d
Login to :: with ID: 4E71FF9EE9B8A493 :: is new? = False
User logged! :: Id = 4E71FF9EE9B8A493



User 4E71FF9EE9B8A493 exists in server 90B5, but not on server 2D17.


It's possible I'm doing something wrong to get this behavior, but I cannot find an issue anywhere.

Has anyone had the same issue?

Authentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
pfnathan avatar image
pfnathan answered

When you say log into the server, we are assuming that means your logging into two titles in the same studio right? Can you verify our assumption, please?

If that is the case, then the rest is "by design." Titles share player accounts. In the near future, this concept will be more clearly defined with "namespace-player" and "title-player." What you are seeing is that the namespace-player already exists on the second title, because it was already created by the first.

You will also see that if you save PublisherData on the first title, you will be able to read that PublisherData on the second title. But UserData saved on the first title will NOT be shared with the second title.

The information saved on a namespace-player is available to all titles within a studio. (Currently, this is viewed as PublisherData, and as it turns out the "NewlyCreated" flag)

Also, information saved on a title-player is available only on the title where it was saved. (This is pretty much everything that's NOT PublisherData: Items, stats, VC, etc.)

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

beneton avatar image beneton commented ·

Yes, both servers are from the same studio.
Ok, I understand now, but is there a way to know if the user is "new" for that server in specific?

I can do some checks myself but would prefer to use a flag if it's already there.

And thanks for the quick reply :)

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

There's an event but nothing in the API ...There is no way to determine "newlyCreated" for a title-player. It only works for the namespace-player,

0 Likes 0 ·
beneton avatar image beneton pfnathan ♦ commented ·

I see. ok
Maybe it could be included in the roadmap? :)

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

Please add your rquest on the Feature Request page. :)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.