Just wanted to say that so far I'm loving GameSparks. It's blazing fast, simple to setup and use. However, I do have some issues regarding C# and Unity. The documentation seriously lacks examples for various languages.
For instance, in SparkPlayer document, it says
var userName = Spark.getPlayer().getDisplayName(); which is totally fine. I assume this code example is for CloudCode editor.
However, I would like to see examples of how to get the data from Unity (C# specifically).
I've come up with the following code to get the player displayName and I'm not sure whether I should be doing it like that.
This code seems a bit off to me, but lacking experience and knowledge in this area, I cannot say for sure.
Interestingly enough, if I type Game.Instance.DisplayName = response["displayName"].ToString() doesn't do anything, so I have to do some voodoo with new object.
Debug.Log("[GameSparks]: Logging in...");
GameSparksApi.authenticationRequest(userName, password).sendAsync(delegate(IDictionary<string,object> response)
Debug.Log("[GameSparks]: authentication response="+response["@class"]);
object value = new object();
response.TryGetValue("displayName", out value);
Game.Instance.Player.DisplayName = value.ToString();
Debug.Log("[GameSparks]: authentication "+(GameSparksApi.isAuthenticated()?"succeeded.":"failed."));
If there is a better place to paste code and discuss it, please let me know and I will in the future.
Also, I would assume that the majority of your customers have little to no experience in back-end and that's why they're using GameSparks in the first place - along with the insane amount of time saved not to mention budget.
Thanks a ton!