Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

IShouldIncludeInBuildCallback.ShouldIncludeInBuild

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

public method ShouldIncludeInBuild(path: string): bool;
public bool ShouldIncludeInBuild(string path);

Parameters

pathThe absolute path of the file to be included or excluded.

Returns

bool Return true if the file given by path should be included in the build; otherwise, return false.

Description

Defines the signature for the function invoked by the Package Manager to determine whether a package file should be included or excluded from a project build.

Implementations of this function must take the absolute path of a file in a package and return whether or not to include the file in the build. Register an instance of the class implementing this function with the BuildUtilities.RegisterShouldIncludeInBuildCallback function.

Did you find this page useful? Please give it a rating: