Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
AssetRef.h File Reference

Asset reference wrapper for automatic GUID storage and asset loading. More...

Classes

struct  Deki::AssetRefBase
 Base class for type-erased access to AssetRef. More...
struct  Deki::AssetRef< T >
 Type-safe asset reference wrapper. More...

Namespaces

namespace  Deki

Detailed Description

Asset reference wrapper for automatic GUID storage and asset loading.

AssetRef<T> provides a single field that handles both:

  • Runtime: pointer to loaded asset + GUID for loading
  • Editor: GUID string for serialization

Usage: class SomeComponent { AssetRef<SomeAsset> ref; // Single field handles everything };

Works with any asset type that has a static AssetTypeName member. No per-type registration needed in this file.