MetaData MetaData { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The MetaData property of the Editor.Asset class provides a key-value based data storage mechanism that is specific to the asset type. This allows for the storage and retrieval of additional information related to the asset, which can be used for various purposes such as configuration, metadata, or custom data handling.

Usage

To use the MetaData property, you can access it directly from an instance of the Editor.Asset class. This property is useful for storing custom data that is specific to the asset type and can be retrieved or modified as needed.

Example

// Example of accessing the MetaData property
Editor.Asset myAsset = GetAsset(); // Assume GetAsset() returns an instance of Editor.Asset
Editor.MetaData metaData = myAsset.MetaData;

// Example of setting a key-value pair in MetaData
metaData.Set("Author", "John Doe");

// Example of retrieving a value from MetaData
string author = metaData.Get<string>("Author");

// Check if a key exists
bool hasAuthor = metaData.ContainsKey("Author");