void UpPoint(bool success) { OnUpPointFinished -= UpPoint; if (success) { Debug.Log(success); } }
void Update() { //Debug.Log ("-update-"); //Asynchronous call with delegate if (Input.GetKeyDown(KeyCode.E)) { Debug.Log("Press E -> "); OnUpPointFinished += UpPoint; StartCoroutine(AsyncCall()); Debug.Log("After UpPoint"); } //Synchonous call if (Input.GetKeyDown(KeyCode.R)) { Debug.Log("Press R -> "); UpPointSynchronous(true); Debug.Log("After UpPointSynchronous"); } }