/// <summary> /// Performs setup using the Android resources downloaded XML file /// from the play console. /// </summary> /// <returns><c>true</c>, if setup was performed, <c>false</c> otherwise.</returns> /// <param name="clientId">The web client id.</param> /// <param name="classDirectory">the directory to write the constants file to.</param> /// <param name="className">Fully qualified class name for the resource Ids.</param> /// <param name="resourceXmlData">Resource xml data.</param> /// <param name="nearbySvcId">Nearby svc identifier.</param> /// <param name="requiresGooglePlus">Indicates this app requires G+</param> public static bool PerformSetup( string clientId, string classDirectory, string className, string resourceXmlData, string nearbySvcId) { if (string.IsNullOrEmpty(resourceXmlData) && !string.IsNullOrEmpty(nearbySvcId)) { return(PerformSetup( clientId, GPGSProjectSettings.Instance.Get(GPGSUtil.APPIDKEY), nearbySvcId)); } if (ParseResources(classDirectory, className, resourceXmlData)) { GPGSProjectSettings.Instance.Set(GPGSUtil.CLASSDIRECTORYKEY, classDirectory); GPGSProjectSettings.Instance.Set(GPGSUtil.CLASSNAMEKEY, className); GPGSProjectSettings.Instance.Set(GPGSUtil.ANDROIDRESOURCEKEY, resourceXmlData); // check the bundle id and set it if needed. CheckBundleId(); GPGSUtil.CheckAndFixDependencies(); GPGSUtil.CheckAndFixVersionedAssestsPaths(); AssetDatabase.Refresh(); Google.VersionHandler.VerboseLoggingEnabled = true; Google.VersionHandler.UpdateVersionedAssets(forceUpdate: true); Google.VersionHandler.Enabled = true; AssetDatabase.Refresh(); Google.VersionHandler.InvokeStaticMethod( Google.VersionHandler.FindClass( "Google.JarResolver", "GooglePlayServices.PlayServicesResolver"), "MenuResolve", null); return(PerformSetup( clientId, GPGSProjectSettings.Instance.Get(GPGSUtil.APPIDKEY), nearbySvcId)); } return(false); }