Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

BuildContentOptions

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Build options for Content Directory builds. Multiple options can be combined together.

Additional resources: BuildPipeline.BuildContentDirectory

using UnityEditor;

namespace BuildDocExamples { public class BuildContentOptions_BuildContentDirectoryExample { [MenuItem("BuildDocExamples/Build/Build Content Directory with options")] public static void BuildWithContentOptionsExample() { var parameters = new BuildContentDirectoryParameters { outputPath = "Builds/MyContentDirectory", rootAssetPaths = new[] { "Assets/MyRootAsset.asset" }, options = BuildContentOptions.CleanBuildCache | BuildContentOptions.FailBuildWhenErrorsLogged };

BuildPipeline.BuildContentDirectory(parameters); } } }

Properties

Property Description
None Perform the specified build without any special settings or extra tasks.
UseArchive Build content using archive files (.archive) for storage.
DisableWriteTypeTree Do not include type tree information in the serialized data.
CleanBuildCache Clear all cached build results, resulting in a full rebuild of content.
FailBuildWhenErrorsLogged Do not allow the build to succeed if any errors are reported during it.
SerializeUnityVersion Include the Unity version information in the serialized build data.