c# - Saving score into MS SQL database from Unity3D Android game -
i'm trying save score ms sql database.
i've created asp.net mvc web application , when seek phone call specific url:
www.mydomain.com/controller/action?
whit specific parameters:
name=somename&score=somescore
score saved.
in unity c# script used www api. here code:
using unityengine; using system.collections; public class showscore : monobehaviour { public string addscoreurl = "http://www.mydomain.com/controller/action?"; string score=somestaticclass.score; void start () { string name=systeminfo.devicename+"_"+systeminfo.devicemodel; startcoroutine(postscores(name,score)); } ienumerator postscores(string name, int score) { string post_url = addscoreurl + "name=" + www.escapeurl(name) + "&score=" + score ; www hs_post = new www(post_url); yield homecoming hs_post; // wait until download done if (hs_post.error != null) { print("there error posting high score: " + hs_post.error.toupper()); } }
for testing build application windows, web , android. working fine windows , web android app not save score database.
what can problem?
abit late reply using problem database speed
c# android sql-server asp.net-mvc-4 unity3d
No comments:
Post a Comment