Skip to main content

Class SettingsBuildHelper<T>

Helper base class that add Settings`1?text=settings+asset to preloaded assets list before building. Preloaded assets will be loaded at start up in packaged build. The asset is removed from the list after build to ensure the list stay the same.

public abstract class SettingsBuildHelper<T> : ScriptableObjectBuildHelper<T> where T : Settings<T>

Type Parameters​

NameTypeDescription
TThe setting type.

Inheritance​

Inherited Members​

Remarks​

Override BuildTargetGroup) to customize when the settings asset should be included in the build. For example:

// In this example, the settings will only be preloaded when building for the Standalone target.
public override ScriptableObject SettingsForBuildTargetGroup(BuildTargetGroup buildTargetGroup)
{
return (buildTargetGroup == BuildTargetGroup.Standalone)
? base.SettingsForBuildTargetGroup(buildTargetGroup)
: null;
}

Methods​

SettingsForBuildTargetGroup(BuildTargetGroup)​

Helper functin to return current settings for a specific build target.

public override ScriptableObject SettingsForBuildTargetGroup(BuildTargetGroup buildTargetGroup)

Parameters​

NameTypeDescription
buildTargetGroupBuildTargetGroupAn enum specifying which platform group this build is for.

Returns​

ScriptableObject — A unity object representing the settings instance data for that build target, or null if not found.