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
| Name | Type | Description |
|---|---|---|
T | The setting type. |
Inheritance
Inherited Members
- ScriptableObjectBuildHelper<T>.callbackOrder
- ScriptableObjectBuildHelper<T>.SettingsForBuildTargetGroup(BuildTargetGroup)
- ScriptableObjectBuildHelper<T>.OnPreprocessBuild(BuildReport)
- ScriptableObjectBuildHelper<T>.OnPostprocessBuild(BuildReport)
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
| Name | Type | Description |
|---|---|---|
buildTargetGroup | BuildTargetGroup | An 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.