Thaina / google-signin-unity

Google Sign-In API plugin for Unity game engine. Works with Android and iOS.
Other
29 stars 9 forks source link

Compile Error missing enum member 'DeveloperError' #7

Closed SackMaggie closed 1 month ago

SackMaggie commented 3 months ago
Library\PackageCache\com.google.signin@65c9f132ca\GoogleSignIn\GoogleSignIn.cs(97,38): error CS0117: 'GoogleSignInStatusCode' does not contain a definition for 'DeveloperError'

In this code section

    public static GoogleSignIn DefaultInstance {
      get {
        if (theInstance == null) {
#if UNITY_EDITOR || UNITY_STANDALONE
          theInstance = new GoogleSignIn(new GoogleSignInImplEditor(Configuration));
#elif UNITY_ANDROID || UNITY_IOS
          theInstance = new GoogleSignIn(new GoogleSignInImpl(Configuration));
#else
          theInstance = new GoogleSignIn(null);
          throw new SignInException(
              GoogleSignInStatusCode.DeveloperError,
              "This platform is not supported by GoogleSignIn");
#endif
        }
        return theInstance;
      }
    }

But it should be

    public static GoogleSignIn DefaultInstance {
      get {
        if (theInstance == null) {
#if UNITY_EDITOR || UNITY_STANDALONE
          theInstance = new GoogleSignIn(new GoogleSignInImplEditor(Configuration));
#elif UNITY_ANDROID || UNITY_IOS
          theInstance = new GoogleSignIn(new GoogleSignInImpl(Configuration));
#else
          theInstance = new GoogleSignIn(null);
          throw new SignInException(
              GoogleSignInStatusCode.DEVELOPER_ERROR,
              "This platform is not supported by GoogleSignIn");
#endif
        }
        return theInstance;
      }
    }

Enum member

public enum GoogleSignInStatusCode {
  SUCCESS_CACHE = -1,
  SUCCESS = 0,
  [System.Obsolete]
  SERVICE_MISSING = 1,
  [System.Obsolete]
  SERVICE_VERSION_UPDATE_REQUIRED = 2,
  [System.Obsolete]
  SERVICE_DISABLED = 3,
  SIGN_IN_REQUIRED = 4,
  INVALID_ACCOUNT = 5,
  RESOLUTION_REQUIRED = 6,
  NETWORK_ERROR = 7,
  INTERNAL_ERROR = 8,
  SERVICE_INVALID = 9,
  DEVELOPER_ERROR = 10,
  LICENSE_CHECK_FAILED = 11,
  ERROR = 13,
  INTERRUPTED = 14,
  TIMEOUT = 15,
  CANCELED = 16,
  API_NOT_CONNECTED = 17,
  DEAD_CLIENT = 18,
  REMOTE_EXCEPTION = 19,
  CONNECTION_SUSPENDED_DURING_CALL = 20,
  RECONNECTION_TIMED_OUT_DURING_UPDATE = 21,
  RECONNECTION_TIMED_OUT = 22
}

image

Thaina commented 2 months ago

Did the last commit fix this issue?

SackMaggie commented 1 month ago

Seem like it's fixed thanks!