Sign In Register

How can we help you today?

Start a new topic

Calling custom responses/requests from Unity

If I have custom cloud code in the form of a request/response, what's the the way that I can call these custom requests/responses?


Thank you

1 Comment

Hi Ian,


You can call a LogEventRequest and provide the relevant eventKey and attributes associated with that event.


 An example of this in Unity is below.



new GameSparks.Api.Requests.LogEventRequest()
			.SetEventKey(<eventName>)
			.SetEventAttribute(<attributeName>, <data>)
			.Send((response) =>
			{
				if (!response.HasErrors)
				{
					// Get Data, do stuff
				}
				else
				{
					// Error
				}
			});

 

Login to post a comment