/// <summary> /// Gets the output path. /// </summary> /// <param name="outputFileName">The output file name.</param> /// <returns>Returns the output path.</returns> protected virtual string GetOutputPath(string outputFileName) { var fileExtension = BuildTargetUtils.GetFileExtension(Settings.Target); return(CommandUtils.PathCombine(Values.DEFAULT_BUILD_FOLDER_NAME, Settings.Target.ToString(), string.Format("{0}{1}", outputFileName, fileExtension))); }
/// <summary> /// Applies the values of a <see cref="BuildPlayerSettings"/> instance to <see cref="EditorUserBuildSettings"/> and <see cref="PlayerSettings"/>. /// </summary> /// <param name="settings">The build player settings instance.</param> public static void Apply(BuildPlayerSettings settings) { var targetGroup = BuildTargetUtils.GetBuildTargetGroup(settings.Target); EditorUserBuildSettings.SwitchActiveBuildTarget(targetGroup, settings.Target); PlayerSettings.SetApplicationIdentifier(targetGroup, settings.ApplicationIdentifier); PlayerSettings.bundleVersion = settings.BundleVersion; EditorPrefs.SetString("AndroidSdkRoot", settings.AndroidSdkPath); PlayerSettings.Android.keyaliasName = settings.AndroidKeyAliasName; PlayerSettings.Android.keyaliasPass = settings.AndroidKeyAliasPass; PlayerSettings.Android.keystoreName = settings.AndroidKeyStoreName; PlayerSettings.Android.keystorePass = settings.AndroidKeyStorePass; }
/// <summary> /// Creates an instance of <see cref="BuildAssetBundlesCommandBase"/>. /// </summary> public BuildAssetBundlesCommandBase() { Settings = new BuildAssetBundlesSettings(); // Gets the build target string. string buildTargetString; if (!GetArgumentValue(Values.ARG_BUILD_TARGET, out buildTargetString)) { throw new Exception(string.Format("Argument '{0}' is required.", Values.ARG_BUILD_TARGET)); } var buildTarget = buildTargetString.ToBuildTarget(); // Sets the build target. Settings.TargetPlatform = buildTarget; var targetGroup = BuildTargetUtils.GetBuildTargetGroup(Settings.TargetPlatform); if (!IsBuildTargetSupported(targetGroup, Settings.TargetPlatform)) { throw new Exception(string.Format("Build target '{0}' is not supported on this editor.", Settings.TargetPlatform)); } }