Class SubmoduleStrippingSettings
An asset for configuring submodule stripping settings.
Inherited Members
Namespace: Unity.Web.Stripping.Editor
Assembly: Unity.Web.Stripping.Editor.dll
Syntax
[CreateAssetMenu(fileName = "SubmoduleStrippingSettings", menuName = "Web Optimization/Submodule Stripping Settings")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.web.stripping-tool@1.0/manual/submodule-reference.html")]
public class SubmoduleStrippingSettings : ScriptableObject
Fields
MissingSubmoduleErrorHandling
The error handling behavior when a stripped submodule is used.
Declaration
[Tooltip("The error handling behavior when a stripped submodule is used. The usage of a stripped submodule can be ignored, logged to the browser console, or thrown as an exception.")]
public MissingSubmoduleErrorHandlingType MissingSubmoduleErrorHandling
Field Value
Type | Description |
---|---|
Missing |
OptimizeCodeAfterStripping
Run code optimization to reduce final build size and improve performance. Increases the stripping time significantly. Use on release builds.
Declaration
[Tooltip("Run code optimization to reduce final build size and improve performance. Increases the stripping time significantly. Use on release builds.")]
public bool OptimizeCodeAfterStripping
Field Value
Type | Description |
---|---|
bool |
RemoveEmbeddedDebugSymbols
Remove embedded debug symbols after stripping. Debug symbols are required to identify functions during stripping but they increase the size of WebAssembly files. Use on release builds if debug symbols are not required for other use cases.
Declaration
[Tooltip("Remove embedded debug symbols after stripping. Debug symbols are required to identify functions during stripping, but they increase the size of WebAssembly files. Use on release builds if debug symbols are not required for other uses cases.")]
public bool RemoveEmbeddedDebugSymbols
Field Value
Type | Description |
---|---|
bool |
RootMenuName
The root menu name used for various menu items.
Declaration
public const string RootMenuName = "Web Optimization"
Field Value
Type | Description |
---|---|
string |
SubmodulesToStrip
The list of submodules to strip from a build.
Declaration
[Tooltip("The list of submodules to strip from a build.")]
public List<string> SubmodulesToStrip
Field Value
Methods
Create(string)
Creates a settings asset.
Declaration
public static SubmoduleStrippingSettings Create(string assetPath)
Parameters
Type | Name | Description |
---|---|---|
string | assetPath | Note that the final name can be different if an asset with the same name already exists. |
Returns
Type | Description |
---|---|
Submodule |
The created asset. |
Save()
Save changes to the settings to disk.
Declaration
public void Save()
Events
ValuesChanged
Raised when the values of the settings are changed.
Declaration
public event Action ValuesChanged
Event Type
Type | Description |
---|---|
Action |