void Start() { if (api) // Checks if the api is present. { /** * Request quize's questions. */ api.Request( new Action <Response>((Response response) => { // Success callback. questions = response.results; RenderQuestion(); if (canvas) { canvas.HideFeedback(); } }), new Action <Error>((Error error) => { // Error callback. Debug.Log(error.statusCode + ", " + error.errorMessage); }) ); } _instance = this; }
void Start() { if (api) { api.Request( new Action <Question[]>((Question[] response) => { questions = new List <Question>(response); RenderQuestion(); if (canvas) { canvas.HideFeedback(); } }), new Action <Error>((Error error) => { // Error callback. Debug.Log(error.statusCode + ", " + error.errorMessage); }) ); } _instance = this; }