question

Ryan Carson avatar image
Ryan Carson asked

Stuck at initialisation - Unity3d Version 4.2.0

Okay, I must be going wrong somewhere here. I made a skeleton app, just camera, Gamecirclemanager, api key, debug keytool, etc,etc all set-up, just one script running attached to the main camera, indicated below: #pragma strict var isServiceReady = false; var message = ""; function Start () { } function serviceNotReadyHandler (error:String) { message = "Service is not ready" + "\n" + error; } function serviceReadyHandler () { message = "Service IS READY!!!!!"; } function Update () { isServiceReady = AGSClient.IsServiceReady(); AGSClient.ServiceReadyEvent += serviceReadyHandler; AGSClient.ServiceNotReadyEvent += serviceNotReadyHandler; AGSClient.Init (true, true, false); } function OnGUI(){ GUI.Label(Rect(20,20,Screen.width-20,Screen.height/2),message); } I get the sign in pop-up very quickly aafter the Service is Ready message appears but I barely get a chance to click it, a long while later, the screen whites out and...oOhhh, I think it's working. But it's taking over a minute to get to the gamecircle screen. Where am I going wrong? Should I be using co-routines? I've never tried them before so a bit of sample code would really help me out here.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Ryan Carson avatar image
Ryan Carson answered
Fixed my skeleton code up now, for reference #pragma strict var isServiceReady = false; var message = ""; function Start () { isServiceReady = AGSClient.IsServiceReady(); AGSClient.ServiceReadyEvent += serviceReadyHandler; AGSClient.ServiceNotReadyEvent += serviceNotReadyHandler; AGSClient.Init (true, true, false); } function serviceNotReadyHandler (error:String) { message = "Service is not ready" + "\n" + error; } function serviceReadyHandler () { message = "Service IS READY!!!!!"; } function Update () { } function OnGUI(){ GUI.Label(Rect(20,20,Screen.width-20,Screen.height/2),message); }
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.