Asset Class
Namespace: Stride.Core.AssetsAssembly: Stride.Core.Assets.dll
Base class for Asset.
[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() | ||
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
| 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.  | 
                  
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 |