public void Initialize(Action <System.Object, string> callback = null, string url = null, string address = null) { /// Initialize the wrapper by: /// 1. Creating and Fetching the user's local address /// 2. Calling InitializeKin which handles functions that need internet connectivity //This code can only run on Android - so we check for this first if (callback != null) { listenerCallback = callback; } if (Application.platform != RuntimePlatform.Android && Application.platform != RuntimePlatform.IPhonePlayer) { LogError("Kin can only run on Android or Android Emulator, not the Unity Editor or Unity Remote"); return; //can only run on Android } serverKinAddress = address; baseURL = url; if (verbose) { listenerCallback?.Invoke("Account Address:" + kinAccount.GetPublicAddress(), "log"); } if (address == "" || url == "") { if (verbose) { listenerCallback?.Invoke("Cannot proceed without remote server", "log"); } return; } StartCoroutine(WaitForNet //Make sure user is online (InitializeKin) //Initilize the user's account online ); }
protected IEnumerator CreateAccount() { yield return(StartCoroutine(KinOnboarding.CreateAccount(_account.GetPublicAddress(), OnCompleteCreateAccount))); }