Provides various options to control the behavior of BuildPipeline.BuildContentDirectory.
Additional resources: BuildPipeline, EditorUserBuildSettings, EditorBuildSettings
using UnityEditor; using UnityEngine;
namespace BuildDocExamples { public class BuildPipeline_BuildContentDirectoryExample { [MenuItem("BuildDocExamples/Build/Build Content Directory")] public static void BuildContentDirectoryExample() { var parameters = new BuildContentDirectoryParameters { outputPath = "Builds/MyContentDirectory", rootAssetPaths = new[] { "Assets/MyRootAsset.asset" }, options = BuildContentOptions.None };
BuildPipeline.BuildContentDirectory(parameters); } } }
| Property | Description |
|---|---|
| compression | Compression settings for the build. When not specified the value is BuildCompression.Uncompressed. |
| extraScriptingDefines | User-specified preprocessor defines used while compiling assemblies during the build. (optional) |
| name | Optional name for the build. |
| options | Flags from the BuildContentOptions enum. (optional) |
| outputPath | Output path for the build. |
| rootAssetPaths | Array of paths to the root Assets that should be included in the build. |
| subtarget | The subtarget to build. (optional) |
| targetPlatform | The BuildTarget to build. (optional) |