Search Results for

    Show / Hide Table of Contents

    Class AssetSource

    This class contains all information about an asset metafile.

    Inheritance
    object
    AssetSource
    EffectSource
    FrameBufferSource
    MaterialSource
    ParticleSystemSource
    PostProcessingGraphSource
    RenderLayerSource
    SamplerSource
    FileSource
    FontSource
    ModelSource
    PrefabSource
    ReflectionProbeSource
    SceneSource
    SoundSource
    TextureSource
    Implements
    IAssetSource
    Namespace: Evergine.Framework.Assets
    Assembly: Evergine.Framework.dll
    Syntax
    public abstract class AssetSource : IAssetSource

    Constructors

    AssetSource()

    Initializes a new instance of the AssetSource class.

    Declaration
    public AssetSource()

    Fields

    ImporterContext

    The importer context.

    Declaration
    public object ImporterContext
    Field Value
    Type Description
    object

    Properties

    AssetParts

    Gets the asset parts from the asset source.

    Declaration
    public abstract List<AssetPart> AssetParts { get; }
    Property Value
    Type Description
    List<AssetPart>

    Header

    Gets or sets the asset header.

    Declaration
    public AssetHeader Header { get; set; }
    Property Value
    Type Description
    AssetHeader

    Id

    Gets the asset source ID.

    Declaration
    public Guid Id { get; }
    Property Value
    Type Description
    Guid

    Importer

    Gets or sets the asset importer.

    Declaration
    public IAssetImporter Importer { get; set; }
    Property Value
    Type Description
    IAssetImporter

    IsPreprocessed

    Gets or sets a value indicating whether the resource has been preprocessed.

    Declaration
    public bool IsPreprocessed { get; set; }
    Property Value
    Type Description
    bool

    LastModified

    Gets or sets the last modified time.

    Declaration
    public DateTime LastModified { get; set; }
    Property Value
    Type Description
    DateTime

    Methods

    FindAssetPart<TPart>(int)

    Finds an asset part by the specified type.

    Declaration
    public TPart FindAssetPart<TPart>(int index = 0) where TPart : AssetPart
    Parameters
    Type Name Description
    int index

    The index in case multiple asset parts exist.

    Returns
    Type Description
    TPart

    The asset part.

    Type Parameters
    Name Description
    TPart

    The asset part type.

    FindAssetParts<TPart>()

    Finds all asset parts of the specified type.

    Declaration
    public List<TPart> FindAssetParts<TPart>() where TPart : AssetPart
    Returns
    Type Description
    List<TPart>

    The list of asset parts.

    Type Parameters
    Name Description
    TPart

    The asset part type.

    Free()

    Frees all resources of this asset source.

    Declaration
    public virtual void Free()

    GetImporter(string)

    Sets the asset importer.

    Declaration
    public virtual IAssetImporter GetImporter(string fileName)
    Parameters
    Type Name Description
    string fileName

    The asset file name.

    Returns
    Type Description
    IAssetImporter

    The asset importer.

    UpdateAssetPart<TPart>(TPart, int)

    Updates an asset part.

    Declaration
    public void UpdateAssetPart<TPart>(TPart newPart, int index = 0) where TPart : AssetPart
    Parameters
    Type Name Description
    TPart newPart

    The asset part to update.

    int index

    The index of the asset part.

    Type Parameters
    Name Description
    TPart

    The asset part type.

    Implements

    IAssetSource

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX