template<typename T> asge::game::asset::Asset final
A loaded value paired with the virtual path it was loaded from.
#include <Asset.hpp>The asset-handle type ECS components and scenes hold instead of a hardcoded path: wraps whatever a loader (e.g. Image::Load, Font::Load) produced, alongside the virtual path (see filesystem::VirtualFileSystem) it was resolved from. Always shared_ptr-managed (see Create()) so enable_shared_from_this is safe to use.
Public Types
#
using value_type = TPrivate Attributes
Public Member Functions
#
Asset(PrivateTag, str::String inVirtualPath, T inValue)Passkey-gated constructor; use Create() instead of calling this directly.
#
Asset(Asset const &)=delete#
Asset(Asset &&)=default#
T & Get() noexceptReturns the wrapped value.
#
str::StringView VirtualPath() const noexceptReturns the virtual path this asset was loaded from.