async public void Login() { string email = emailInput.GetComponent <InputField>().text; string password = passwordInput.GetComponent <InputField>().text; EnjinUser user = await EnjinUser.Login(email, password); Option <EnjinIdentity> userIdentityOption = await user.GetIdentityForAppId(APP_ID); EnjinIdentity userIdentity = userIdentityOption.Reduce(() => { throw new System.Exception("User ID not found"); }); GoToGame(); }
async public void LoginAdmin() { string email = "*****@*****.**"; string password = "******"; EnjinUser user = await EnjinUser.Login(email, password); Option <EnjinIdentity> adminIdentityOption = await user.GetIdentityForAppId(APP_ID); EnjinIdentity identity = adminIdentityOption.Reduce(() => { throw new System.Exception("User ID not found"); }); adminAddress = identity.GetEthereumAddress().Reduce(""); adminIdentity = identity.asAdmin(); }