Class WebBuildReportList
Manage all web builds. The list of builds is automatically updated when a build is completed. The build list is saved to the UserSettings folder in the project's root directory.
Inherited Members
Namespace: Unity.Web.Stripping.Editor
Assembly: Unity.Web.Stripping.Editor.dll
Syntax
public class WebBuildReportList
Properties
Builds
A list of all web build reports.
Declaration
public List<WebBuildReport> Builds { get; }
Property Value
Type | Description |
---|---|
List<Web |
Instance
Get instance of WebBuildReportList
(Singleton pattern).
Declaration
public static WebBuildReportList Instance { get; }
Property Value
Type | Description |
---|---|
Web |
Methods
AddOrUpdateBuild(string)
Add a build at the given path to the list of builds or update the existing build report if the build is already in the list.
Declaration
public WebBuildReport AddOrUpdateBuild(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | Path to a web build. |
Returns
Type | Description |
---|---|
Web |
A web build report object |
ClearBuilds()
Removes all builds from the build list.
Declaration
public void ClearBuilds()
GetBuild(string)
Find the web build report for the given path in the build list. If the path is a relative path, it will be automatically converted to an absolute path.
Declaration
public WebBuildReport GetBuild(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | Path to a web build. |
Returns
Type | Description |
---|---|
Web |
A web build report or null if build is not in the list. |
RemoveBuild(WebBuildReport)
Removes a build from the build list based on the output path.
Declaration
public bool RemoveBuild(WebBuildReport build)
Parameters
Type | Name | Description |
---|---|---|
Web |
build | The web build report to remove from the list. |
Returns
Type | Description |
---|---|
bool | Returns 'true' if the build was removed, 'false' otherwise. |
Update()
Updates the information of all builds to match the contents of their build directories.
Declaration
public void Update()
Remarks
Doesn't trigger BuildsUpdated
as the list itself doesn't change.
UpdateBuild(string)
Update the build at the given path.
Declaration
public WebBuildReport UpdateBuild(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | Path to a web build. |
Returns
Type | Description |
---|---|
Web |
A web build report object or null if the build is not in the build list. |
Events
BuildsUpdated
An event that is triggered when the web build report list is updated.
Declaration
public event Action<List<WebBuildReport>> BuildsUpdated
Event Type
Type | Description |
---|---|
Action<List<Web |