Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public static int ApplyRetentionPolicy()

Returns

Type

Description

intThe 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