Show / Hide Table of Contents

Class IAsset

Asset base class. This is the basic class all Assets inherit from and its main purpose is to manage the handle to the CPP-side asset.

Inheritance
System.Object
IAsset
ConfigAsset
EffectAsset
FontAsset
ImageAsset
MusicAsset
SoundAsset
Implements
System.IDisposable
Namespace: BonEngineSharp.Assets
Assembly: BonEngineSharp.dll
Syntax
public abstract class IAsset : Object, IDisposable

Constructors

IAsset(IntPtr)

Create the asset.

Declaration
public IAsset(IntPtr handle)
Parameters
Type Name Description
System.IntPtr handle

Asset handle inside the low-level engine.

Fields

_handle

The asset's handle in BonEngine.

Declaration
protected IntPtr _handle
Field Value
Type Description
System.IntPtr

Tag

Optional tag you can attach to assets to identify them later in logs.

Declaration
public string Tag
Field Value
Type Description
System.String

Properties

AssetType

Get asset type.

Declaration
public abstract AssetType AssetType { get; }
Property Value
Type Description
AssetType

FullIdentifier

Get asset full identifier.

Declaration
protected string FullIdentifier { get; }
Property Value
Type Description
System.String

FullPath

Asset's full file path, if have one.

Declaration
public virtual string FullPath { get; }
Property Value
Type Description
System.String

HaveHandle

Get if this asset got a handle.

Declaration
protected bool HaveHandle { get; }
Property Value
Type Description
System.Boolean

IsValid

Is this asset valid?

Declaration
public virtual bool IsValid { get; }
Property Value
Type Description
System.Boolean

Path

Asset's file path, relative to Assets root (what we used when loading it).

Declaration
public string Path { get; }
Property Value
Type Description
System.String

Methods

Dispose()

Destroy the asset pointer by releasing its handle.

Declaration
public void Dispose()

Finalize()

Dispose on destructor.

Declaration
protected override void Finalize()

Implements

System.IDisposable
Back to top Generated by DocFX