Class VisitAssets
This class provides helpers to traverse assets or asset properties referenced from a given root object.
public static class VisitAssets
- Inheritance
-
VisitAssets
- Inherited Members
Methods
ReferencedAssets(Object, bool, bool, AssetFilter)
Returns an enumerable of all assets referenced by the given root object.
public static IEnumerable<UnityEngine.Object> ReferencedAssets(this UnityEngine.Object root, bool traverseSaved = true, bool includeScene = true, VisitAssets.AssetFilter traversalFilter = null)
Parameters
root
ObjectThe asset to start traversal from
traverseSaved
boolIf false, traversal will not return assets that are saved
includeScene
boolIf false, scene assets will not be returned
traversalFilter
VisitAssets.AssetFilterIf provided, this filter will be queried for each object encountered; if it returns false, the selected object and all objects referenced from it will be ignored.
Returns
- IEnumerable<UnityEngine.Object>
An enumerable of objects found