question

vivecuervo7 avatar image
vivecuervo7 asked

Is there a way to simulate a new account?

Testing out my game in Unity Editor, and naturally PlayFab will log me into the same account. Is there any way to reset the account, short of deleting it (in the past, I've done this and there was a significant delay) to test the game for a new account? Currently I've been using Nox Player and it's Multi Instance Manager to achieve this, but if there's a more natural solution that I've been missing it'd involve much less stuffing around.

Thanks!

Account Managementtest
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

·
JayZuo avatar image
JayZuo answered

For testing purpose, you can use LoginWithCustomID to easily create new accounts. What you need to do is giving a different Id and set CreateAccount to true. Or if you've already used LoginWithAndroidDeviceID, then after getting device Id, you can add some random number to it, so that every time you will log into a different account. For example:

var randomId = UnityEngine.Random.Range(0, 100);
PlayFabClientAPI.LoginWithAndroidDeviceID(new LoginWithAndroidDeviceIDRequest() 
{
 TitleId = TitleId,
 AndroidDevice = SystemInfo.deviceModel,
 AndroidDeviceId = string.Format("{0}-{1}", androidId, randomId),
 OS = SystemInfo.operatingSystem,
 CreateAccount = true
}, result =>{...},error =>{...});

However, if you want to test some Android device specific feature like Android Push Notifications, then only create a new account might not work. You may need multiple emulators/devices. And in this scenario, Nox Player might be a good choice.

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.