AssetDependencyManager Class
Namespace: Stride.Core.Assets.AnalysisAssembly: Stride.Core.Assets.dll
A class responsible for providing asset dependencies for a PackageSession and file tracking dependency.
public sealed class AssetDependencyManager : IAssetDependencyManager, IDisposable
Remarks
This class provides methods to:
- Find assets referencing a particular asset (recursively or not)
- Find assets referenced by a particular asset (recursively or not)
- Find missing references
- Find missing references for a particular asset
- Find assets file changed events that have changed on the disk
Name | Description | |
---|---|---|
Properties | ||
IsInitialized | Gets a value indicating whether this instance is initialized. See remarks. |
|
Methods | ||
BeginSavingSession() | This methods is called when a session is about to being saved. |
|
ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>) | Computes the dependencies for the specified asset. |
|
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
|
EndSavingSession() | This methods is called when a session has been saved. |
|
Events | ||
AssetChanged | Occurs when a asset changed. This event is called in the critical section of the dependency manager, meaning that dependencies can be safely computed via ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>) method from this callback. |
Properties
IsInitialized
Gets a value indicating whether this instance is initialized. See remarks.
public bool IsInitialized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
If this instance is not initialized, all public methods may block until the full initialization of this instance.
Methods
BeginSavingSession()
This methods is called when a session is about to being saved.
public void BeginSavingSession()
ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>)
Computes the dependencies for the specified asset.
public AssetDependencies ComputeDependencies(AssetId assetId, AssetDependencySearchOptions dependenciesOptions = AssetDependencySearchOptions.All, ContentLinkType linkTypes = ContentLinkType.Reference, HashSet<AssetId> visited = null)
Parameters
Type | Name | Description |
---|---|---|
AssetId | assetId | The asset id. |
AssetDependencySearchOptions | dependenciesOptions | The dependencies options. |
ContentLinkType | linkTypes | The type of links to visit while computing the dependencies |
System.Collections.Generic.HashSet<AssetId> | visited | The list of element already visited. |
Returns
Type | Description |
---|---|
AssetDependencies | The dependencies, or |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
EndSavingSession()
This methods is called when a session has been saved.
public void EndSavingSession()
Events
AssetChanged
Occurs when a asset changed. This event is called in the critical section of the dependency manager, meaning that dependencies can be safely computed via ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>) method from this callback.
public event DirtyFlagChangedDelegate<AssetItem> AssetChanged
Event Type
Type | Description |
---|---|
DirtyFlagChangedDelegate<AssetItem> |