Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    Asset Class

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

    Base class for Asset.

    System.Object → Asset
    Derived from Asset: AssetComposite AssetWithSource SourceCodeAsset

    [DataContract(Inherited = true)]
    public abstract class Asset
    Name Description
    Constructors
    Asset()

    Initializes a new instance of the Asset class.

    Properties
    Archetype
    Id

    Gets or sets the unique identifier of this asset.

    MainSource

    Gets the main source file for this asset, used in the editor.

    SerializedVersion

    Gets or sets the version number for this asset, used internally when migrating assets.

    Tags

    Gets the tags for this asset.

    Methods
    CreateDerivedAsset(String)

    Creates an asset that inherits from this asset.

    CreateDerivedAsset(String, out Dictionary<Guid, Guid>)

    Creates an asset that inherits from this asset.

    ToString()
    | Improve this Doc View Source

    Constructors


    Asset()

    Initializes a new instance of the Asset class.

    protected Asset()
    | Improve this Doc View Source

    Properties


    Archetype

    [DataMember(-500)]
    [Display(null, null, Browsable = false)]
    public AssetReference Archetype { get; set; }
    Property Value
    Type Description
    AssetReference

    Id

    Gets or sets the unique identifier of this asset.

    [DataMember(-10000)]
    [Display(null, null, Browsable = false)]
    public AssetId Id { get; set; }
    Property Value
    Type Description
    AssetId

    The identifier.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Cannot change an Asset Object Id once it is locked


    MainSource

    Gets the main source file for this asset, used in the editor.

    public virtual UFile MainSource { get; }
    Property Value
    Type Description
    Stride.Core.IO.UFile

    SerializedVersion

    Gets or sets the version number for this asset, used internally when migrating assets.

    [DataMember(-8000, DataMemberMode.Assign)]
    [DataStyle(DataStyle.Compact)]
    [Display(null, null, Browsable = false)]
    public Dictionary<string, PackageVersion> SerializedVersion { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, Stride.Core.PackageVersion>

    The version.


    Tags

    Gets the tags for this asset.

    [DataMember(-1000)]
    [Display(null, null, Browsable = false)]
    public TagCollection Tags { get; }
    Property Value
    Type Description
    TagCollection

    The tags for this asset.

    | Improve this Doc View Source

    Methods


    CreateDerivedAsset(String)

    Creates an asset that inherits from this asset.

    public Asset CreateDerivedAsset(string baseLocation)
    Parameters
    Type Name Description
    System.String baseLocation

    The location of this asset.

    Returns
    Type Description
    Asset

    An asset that inherits this asset instance


    CreateDerivedAsset(String, out Dictionary<Guid, Guid>)

    Creates an asset that inherits from this asset.

    public virtual Asset CreateDerivedAsset(string baseLocation, out Dictionary<Guid, Guid> idRemapping)
    Parameters
    Type Name Description
    System.String baseLocation

    The location of this asset.

    System.Collections.Generic.Dictionary<System.Guid, System.Guid> idRemapping

    A dictionary in which will be stored all the System.Guid remapping done for the child asset.

    Returns
    Type Description
    Asset

    An asset that inherits this asset instance


    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

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