Table of Contents

Class Asset

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

Base class for Asset.

[DataContract(Inherited = true)]
public abstract class Asset
Inheritance
Asset
Derived

Constructors

Asset()

Initializes a new instance of the Asset class.

protected Asset()

Properties

Archetype

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

Property Value

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

AssetId

The identifier.

Exceptions

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

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

Dictionary<string, PackageVersion>

The version.

Tags

Gets the tags for this asset.

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

Property Value

TagCollection

The tags for this asset.

Methods

CreateDerivedAsset(string)

Creates an asset that inherits from this asset.

public Asset CreateDerivedAsset(string baseLocation)

Parameters

baseLocation string

The location of this asset.

Returns

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

baseLocation string

The location of this asset.

idRemapping Dictionary<Guid, Guid>

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

Returns

Asset

An asset that inherits this asset instance

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.