vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::AssetRef< Asset > Struct Template Reference

An authored reference to an asset, held as the name it is filed under. More...

#include <asset_ref.h>

Public Attributes

std::string name
 Asset name; empty for none.

Detailed Description

template<typename Asset>
struct Vkm::Engine::AssetRef< Asset >

An authored reference to an asset, held as the name it is filed under.

A behavior field such as AssetRef<AudioClipAsset> footstep;. A name, not a Handle<Asset>, because a handle means nothing in the next session. The type tells AssetSerializer's walk which section of the assets block the name goes in, and the editor which list to offer.

An empty name means "none". The behavior resolves it once, in onStart():

m_clip = resources().find(footstep);

Template Parameters
AssetThe asset struct referenced; it needs an ASSET_TYPE (resource/asset_type.h) to be authorable.

The documentation for this struct was generated from the following file: