public void Authenticate() { #if UNITY_IOS if (Application.platform != RuntimePlatform.IPhonePlayer || currentStatus == GCStatus.kGCAuthenticated) { return; } currentStatus = GCStatus.kGCAuthenticating; authenticateLocalUser(gameObject.name); #endif }
//native callbacks void IsAuthenticated(string error) { if (error == "") { currentStatus = GCStatus.kGCAuthenticated; if (GCUserAuthenticated != null) { GCUserAuthenticated("Authenticated"); } } else { if (GCUserAuthenticated != null) { GCUserAuthenticated(error); } } }