Show / Hide Table of Contents

Class BuildProfile

Build Profiles configure builds. They define which Options are included, how the Options are configured and give Options a chance to influence the build process.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
EditableProfile
BuildProfile
Inherited Members
EditableProfile.CopyAsIniFile()
EditableProfile.PasteFromIniFile()
Namespace: sttz.Trimmer.Editor
Assembly: Trimmer-Editor.dll
Syntax
[CreateAssetMenu(fileName = "Build Profile.asset", menuName = "Trimmer/Build Profile")]
[HelpURL("https://sttz.ch/trimmer/manual/using_trimmer.html")]
public class BuildProfile : EditableProfile
Remarks

A project can contain multiple Build Profiles and each profile can build multiple platforms at once. A Build Profile contains the configuration values for all Options and configures if an Option or its associated feature are included in the build.

The EditorProfile is used to configure the project when playing in the editor.

In the build, OptionPrompt and OptionIniFile can be used to change the included Options' configuration.

See the BuildManager for methods to build profiles.

Properties

| Improve this Doc View Source

AllBuildProfiles

Enumeration of all build profiles in the current project.

Declaration
public static IEnumerable<BuildProfile> AllBuildProfiles { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<BuildProfile>
| Improve this Doc View Source

BuildTargets

The build targets this profile will create builds for.

Declaration
public IEnumerable<BuildTarget> BuildTargets { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<UnityEditor.BuildTarget>
Remarks

If the profile doesn't define any targets, this method will return the active build target.

| Improve this Doc View Source

EditProfile

Declaration
public override RuntimeProfile EditProfile { get; }
Property Value
Type Description
RuntimeProfile
Overrides
EditableProfile.EditProfile
| Improve this Doc View Source

EmptyEditProfile

Edit profile used when there's no active build profile.

Declaration
public static RuntimeProfile EmptyEditProfile { get; }
Property Value
Type Description
RuntimeProfile
| Improve this Doc View Source

Store

Declaration
public override ValueStore Store { get; }
Property Value
Type Description
ValueStore
Overrides
EditableProfile.Store

Methods

| Improve this Doc View Source

ActivateProfile()

Declaration
[ContextMenu("Activate Profile")]
public void ActivateProfile()
| Improve this Doc View Source

AddBuildTarget(BuildTarget)

Add a build target to the profile.

Declaration
public void AddBuildTarget(BuildTarget target)
Parameters
Type Name Description
UnityEditor.BuildTarget target
| Improve this Doc View Source

EditOption(Option)

Declaration
public override void EditOption(Option option)
Parameters
Type Name Description
Option option
Overrides
EditableProfile.EditOption(Option)
| Improve this Doc View Source

Find(String)

Look for a Build Profile by its name (case insensitive).

Declaration
public static BuildProfile Find(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
BuildProfile
| Improve this Doc View Source

GetInclusionOf(Option)

Check if an Option should be included in builds of this profile.

Declaration
public OptionInclusion GetInclusionOf(Option option)
Parameters
Type Name Description
Option option
Returns
Type Description
OptionInclusion
| Improve this Doc View Source

GetLastBuildPath(BuildTarget)

Get the path to the last build of this profile for the given target.

Declaration
public string GetLastBuildPath(BuildTarget target)
Parameters
Type Name Description
UnityEditor.BuildTarget target
Returns
Type Description
System.String

The path or null if no path is recorded.

Remarks

Build paths are only saved on the instance and are lost once Unity does a domain reload or restarts.

| Improve this Doc View Source

RemoveBuildTarget(BuildTarget)

Remove a build target form the profile.

Declaration
public void RemoveBuildTarget(BuildTarget target)
Parameters
Type Name Description
UnityEditor.BuildTarget target
Remarks
Note

If the profile has no build targets set, it will build the active build target.

| Improve this Doc View Source

SaveIfNeeded()

Declaration
public override void SaveIfNeeded()
Overrides
EditableProfile.SaveIfNeeded()
| Improve this Doc View Source

SetLastBuildPath(BuildTarget, String)

Declaration
public void SetLastBuildPath(BuildTarget target, string path)
Parameters
Type Name Description
UnityEditor.BuildTarget target
System.String path
| Improve this Doc View Source

UsesActiveBuildTarget()

Returns wether the profile has no explicit build targets set and builds the active build target instead.

Declaration
public bool UsesActiveBuildTarget()
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
Back to top © 2017 Adrian Stutz