- Home /
having trouble with PlayGamesPlatform.Instance.Events.IncrementEvent("YOUR_EVENT_ID", 1);
Hi there,
As it says in the title, I'm have trouble uploading a value (an integer) to an event.
I want to upload the total number of enemy deaths in a single match of a new game I'm working on (rather than uploading a +1 after killing each individual enemy), however, Visual Studio comes up with an error "The best overload........has some invalid arguments" and I can't seem to find a way around this.
Here is my code:
void UploadKills(int kills)
{
PlayGamesPlatform.Instance.Events.IncrementEvent("Event_Id_To_Call",kills);
}
This function/method is being called by (function is called after the match is finished):
UploadKills(kills);
I was wondering if there is a way to do this without calling PlayGamesPlatform.Instance.Events.IncrementEvent("YOUR_EVENT_ID", 1); after every single enemy death?
If anyone can help that would be greatly appreciated :)
(Probably worth noting I'm using these :`using UnityEngine; using UnityEngine.UI; using GooglePlayGames; using UnityEngine.SocialPlatforms; using System.Collections; In my script).`
Your answer
Follow this Question
Related Questions
No Monobehaviour scripts in files 1 Answer
Help with basic AI script 1 Answer
Distribute terrain in zones 3 Answers