Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AssetDependencyManager Class

    Namespace: Stride.Core.Assets.Analysis
    Assembly: Stride.Core.Assets.dll

    A class responsible for providing asset dependencies for a PackageSession and file tracking dependency.

    System.Object → AssetDependencyManager
    Derived from AssetDependencyManager:

    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.

    | Improve this Doc View Source

    Properties


    IsInitialized

    Gets a value indicating whether this instance is initialized. See remarks.

    public bool IsInitialized { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is initialized; otherwise, false.

    Remarks

    If this instance is not initialized, all public methods may block until the full initialization of this instance.

    | Improve this Doc View Source

    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 null if the object is not tracked.


    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()
    | Improve this Doc View Source

    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>

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article
    In This Article
    • Properties
      • IsInitialized
    • Methods
      • BeginSavingSession()
      • ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>)
      • Dispose()
      • EndSavingSession()
    • Events
      • AssetChanged
    • Extension Methods

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation