Version: Unity 6 Beta (6000.0)
LanguageEnglish
  • C#

BuildPipelineContext

class in UnityEditor.Build

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

Defines the build context for IProcessSceneWithReport during a build event.

This class contains static methods for declaring additional scene dependencies for the build system. These dependencies are used to trigger scene rebuilds in cases where dependencies are not explicit in the scene itself.

For example, if the implementation of IProcessSceneWithReport loads an Asset programmatically then BuildPipelineContext.DependOnAsset should be called, unless the same Asset is also referenced by the Scene. Then, if the Asset is changed and the build run again, Unity will retrigger the callback and save the latest scene state instead of reusing an out-of-date cached result.

Dependency tracking is currently only required when EditorBuildSettings.UseParallelAssetBundleBuilding is true, for calls to BuildPipeline.BuildAssetBundles. It does not currently apply to BuildPipeline.BuildPlayer.

Additional resources: AssetDatabase.LoadAssetAtPath

Static Methods

DependOnAssetAllows you to specify that a Scene depends on contents of an asset directly provided.
DependOnPathAllows you to specify that a Scene depends on contents of a source asset at the provided path.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961