public bool Initialize(BuildToolLogger buildToolLogger) { _initialized = true; // Cache IsInstantBuildType because IsInstantBuildType can only be called on the main thread. _isInstant = PlayInstantBuildSettings.IsInstantBuildType(); return(_buildHelper.Initialize(buildToolLogger)); }
public virtual bool Initialize(BuildToolLogger buildToolLogger) { IsInstantBuild = PlayInstantBuildSettings.IsInstantBuildType(); if (!IsInstantBuild) { if (!_isInstantRequired) { // Check passed: this is a persistent app build invoked by a builder that supports persistent apps. return(true); } // This builder only works for instant apps, however the build isn't currently set to instant. Debug.LogError("Build halted since selected build type is \"Installed\""); var instantRequiredMessage = string.Format( "The currently selected Android build type is \"Installed\".\n\n" + "Click \"{0}\" to open the \"{1}\" window where the build type can be changed to \"Instant\".", WindowUtils.OkButtonText, BuildSettingsWindow.WindowTitle); if (buildToolLogger.DisplayActionableErrorDialog(instantRequiredMessage)) { BuildSettingsWindow.ShowWindow(); } return(false); } // This is an instant app build. Verify that instant-specific required policies are enabled. var failedPolicies = PlayInstantSettingPolicy.GetRequiredPolicies() .Where(policy => !policy.IsCorrectState()) .Select(policy => policy.Name).ToArray(); if (failedPolicies.Length == 0) { return(true); } Debug.LogErrorFormat( "Build halted due to incompatible settings: {0}", string.Join(", ", failedPolicies)); var failedPoliciesMessage = string.Format( "{0}\n\nClick \"{1}\" to open the settings window and make required changes.", string.Join("\n\n", failedPolicies), WindowUtils.OkButtonText); if (buildToolLogger.DisplayActionableErrorDialog(failedPoliciesMessage)) { PlayerSettingsWindow.ShowWindow(); } return(false); }
public IList <AssetPackError> CheckBuildErrors(AssetBundlePack assetBundlePack) { var isInstantBuildType = PlayInstantBuildSettings.IsInstantBuildType(); if (isInstantBuildType && assetBundlePack.DeliveryMode == AssetPackDeliveryMode.InstallTime) { return(new List <AssetPackError> { AssetPackError.InstallTimeAndInstant }); } if (isInstantBuildType && assetBundlePack.DeliveryMode == AssetPackDeliveryMode.FastFollow) { return(new List <AssetPackError> { AssetPackError.FastFollowAndInstant }); } return(new List <AssetPackError>()); }
/// <summary> /// Read and update the window with most recent build configuration values. /// </summary> void ReadFromBuildConfiguration() { _isInstant = PlayInstantBuildSettings.IsInstantBuildType(); }
private void SaveConfiguration() { PlayInstantBuildSettings.SetInstantBuildType(_isInstant); Debug.Log("Saved Play Instant Build Settings"); }
private bool IsAnyFieldChanged() { return(_isInstant != PlayInstantBuildSettings.IsInstantBuildType()); }
bool IBuildAndRunExtension.ShouldOverride() { return(PlayInstantBuildSettings.IsInstantBuildType()); }
public BundletoolBuildMode GetBuildMode() { return PlayInstantBuildSettings.IsInstantBuildType() ? BundletoolBuildMode.Instant : BundletoolBuildMode.Persistent; }
/// <summary> /// Read and update the window with most recent build configuration values. /// </summary> void ReadFromBuildConfiguration() { _isInstant = PlayInstantBuildSettings.IsInstantBuildType(); _playGamesEnabled = PlayInstantBuildConfig.PlayGamesEnabled; }
private void SaveConfiguration() { PlayInstantBuildSettings.SetInstantBuildType(_isInstant); PlayInstantBuildConfig.SaveConfiguration(_playGamesEnabled); Debug.Log("Saved Play Instant Build Settings"); }
private bool IsAnyFieldChanged() { return(_isInstant != PlayInstantBuildSettings.IsInstantBuildType() || _playGamesEnabled != PlayInstantBuildConfig.PlayGamesEnabled); }