Changing the amount of virtual currency of a user

Hello!

Something changed recently under Player Management and I can’t update the virtual currency for a user anymore. I used to do this to test or to grand more currencies for some users manually. Now its impossible to find anything.

Also, on a side note. I used the unity forum a lot before but I am lost here as well…

Hi there!

Can you confirm a couple of things to clarify:

  • You mention “Virtual Currency”, are you referring to using that feature of the Unity Economy system or is your game using Unity Cloud Save to store currency as Player Data?
  • Do you know if you have full admin access to your project in Unity Cloud (and if you are not sure, could you check with someone else in your org who does to see if they have the same issue)?

I’m not aware of any changes to the behaviour Economy on that page, but it’s possible there is an issue we haven’t seen before.

We did fairly recently move Cloud Save Player Data (which is also on the Player Management view) to it’s own page on the Dashboard, as we have expanded the features of Cloud Save considerably, but that new Player Data view is linked to from where the data used to be visible on the Player Management page so it should be easy to get to it.

I’m not sure which is applicable here - just looking to clarify if you are using Economy or Cloud Save!

Hello Iain!

I am a single dev, so I have full admin access to my project in Unity Cloud!

About the system I am using, its the Economy system. When a player purchase a virtual currency, I increment it with this line: var balance = await EconomyService.Instance.PlayerBalances.IncrementBalanceAsync(_currencyId, _amount); and same thing with DecrementBalanceAsync

Under Player Management, when I click on a player ID I see a tab Economy and in it I can see Currencies. I used to be able to manually change the value from this window but the function (like a small icon on the line) is not visible anymore.

Hey @mChapuis ,

You might find this interesting: Cloud Services API package

you can use the sample to manage any of your players’ economy from the editor. Economies are read-only, but with a bit of tweaking you can also edit it.

Cheers

1 Like

Hello!

I was able to make it work, but as you said the economy is read-only. How can I tweak it so I can also edit?

Hey!

It seems the sample window is shipped as un-editable code…

You could still copy-paste it into your project (change namespaces) and it’ll work.
It can be found in the package Cloud Services APIS/Editor/Window/ApiSamplesWindow.cs

image

We’ll consider having it as a sample proper too.

Cheers!

1 Like