Hello. I might have gotten my API to connect, but I have no idea. How do I know if I successfully connected? The game is unpublished. Thank you. -Keavon
EDIT: This is my script:
// Begin the API loading process if it is available
Application.ExternalEval(
"if(typeof(kongregateUnitySupport) != 'undefined'){" +
" kongregateUnitySupport.initAPI('MyUnityObject', 'OnKongregateAPILoaded');" +
"};"
);
var isKongregate = false;
var userId = 0;
var username = "Guest";
var gameAuthToken = "";
function OnKongregateAPILoaded(userInfoString){
// We now know we're on Kongregate
isKongregate = true;
// Split the user info up into tokens
var params = userInfoString.Split("|"[0]);
userId = parseInt(params[0]);
username = params[1];
gameAuthToken = params[2];
}
function OnGUI(){
GUI.Box(Rect(0,0,100,20), username);
}
Thank you!