Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BuildProfile

Provides a set of configuration settings you can use to build your application on a particular platform.
Read time 5 minutesLast updated 2 days ago

Definition

[HelpURL("build-profiles-reference")][ExcludeFromObjectFactory]public sealed class BuildProfile : ScriptableObject

Remarks

Additional Resources: BuildPlayerWithProfileOptions.

Properties

Property

Description

overrideGlobalScenesOverrides the global scene list.
scenesThe list of scenes specified in the build profile.
scriptingDefinesLists the user-specified script compilation defines in the build profile.

Methods

Method

Description

AddComponentAdds a ScriptableObject to the build profile as a sub-asset. Only one instance per type can be embedded within a build profile.
CreateComponentCreates a new instance of a given scriptable object and adds it as a sub-asset to the build profile. Only one instance per type can be embedded within a build profile.
GetComponentReturns a component of type
T
. For PlayerSettings, returns the global fallback if no PlayerSettings component is found. Returns null if the component isn't available.
GetScenesForBuildObtains the list of scenes used when building with the build profile.
RemoveComponentRemoves a component of type
T
from a given build profile.

Static Methods

Method

Description

CreateBuildProfileCreates a new build profile asset for the specified platform with the provided name and places it under
Assets/Settings/Build Profiles
.
GetActiveBuildProfileGets the active build profile.
GetActiveComponentReturns a component of type
T
from the active build profile. For PlayerSettings, returns the global fallback if no PlayerSettings component is found. Returns null if the component isn't available.
GetAllBuildProfilesRetrieves all build profiles available in the project.
GetBuildProfileAtPathRetrieves the build profile asset located at the specified path within the Unity project.
GetInstalledPlatformModulesGets a list of all installed platforms.
SetActiveBuildProfileSets the active build profile.

Static Events

Member

Description

activeProfileChangedCallback invoked when the active build profile has changed to a new value.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.