Asset
- Namespace: Turian.Engine.Core
- Source File: Asset.cs
Represents an asset with a file path.
Properties
RelativePath
(string) { get; set }: Gets or sets the file path of the asset.
Labels
(List[]: Free-form labels grouping this asset with others, e.g. to preload a level's data together.
IsModified
(bool) { get; set }: Signal that the Asset was modified
DisplayName
(string): Gets the asset display name derived from its relative path.
Public Methods
MarkModified
public void MarkModified()
Marks the asset as modified.
MarkSaved
public void MarkSaved()
Marks the asset as saved.
RenameTo
public void RenameTo(string newRelativePath)
Updates the relative path while preserving editor runtime state.
Parameters:
newRelativePath(string)
Load
public static Asset? Load(string absolutePath)
Loads the content from the specified absolute path.
Parameters:
absolutePath(string): The absolute path to load content from.
Returns: Asset?
- An instance of
Assetif the content is successfully loaded; otherwise, an exception is thrown.