ApplyRetentionPolicy()
Deletes the oldest builds in the build history so that no more than BuildHistory.BuildHistoryLimit remain.
Read time 1 minuteLast updated 14 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Build
- Assembly: UnityEditor.CoreModule
public static int ApplyRetentionPolicy()
Returns
Type | Description |
|---|---|
| int | The number of build metadata directories successfully deleted. |
Remarks
If BuildHistory.BuildHistoryLimit is 0, or the current build count is at or below the limit, no entries are removed and this method returns 0.
If a folder cannot be deleted (for example, due to a file lock or a permissions issue), a warning is logged and the operation continues with the remaining entries.
Additional Resources: BuildHistory.BuildHistoryLimit