question

loopan avatar image
loopan asked

How can I get Player location?

Please show me how to get the PLAYER LOCATION in unity.When i try to get this by /Client/GetPlayerProfile,it show me error info like "/Client/GetPlayerProfile: Invalid view constraints. Currently the title has these constraint settings: {"ShowDisplayName":true,"ShowCreated":false,"ShowOrigination":false,"ShowLastLogin":false,"ShowBannedUntil":false,"ShowStatistics":false,"ShowCampaignAttributions":false,"ShowPushNotificationRegistrations":false,"ShowLinkedAccounts":false,"ShowContactEmailAddresses":false,"ShowTotalValueToDateInUsd":false,"ShowValuesToDate":false,"ShowVirtualCurrencyBalances":false,"ShowTags":false,"ShowLocations":false,"ShowAvatarUrl":true,"ShowMemberships":false} UnityEngine.Debug:LogError(Object) UserData:<RequestLocalPlayerData>m__8(PlayFabError) (at Assets/Baskeball/Scripts/Data/UserData.cs:298) PlayFab.Internal.<MakeApiCall>c__AnonStorey3:<>m__0(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:172) PlayFab.Internal.<PostPlayFabApiCall>c__Iterator1:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:228) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)"

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

·
brendan avatar image
brendan answered

This tutorial has a complete write-up on how to set your Client Profile Options to allow you to query the different profile elements:

https://api.playfab.com/docs/tutorials/landing-players/getting-player-profiles

10 |1200

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

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.