Introduce AssetManager

This commit is contained in:
2025-04-20 19:36:17 +02:00
parent d643288e56
commit b78c214229
5 changed files with 81 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
#include <asset/asset_manager.h>
#include <flecs.h>
#include <input/input.h>
#include <log/log.h>
@@ -14,6 +15,13 @@ int main()
world.import <Window::WindowModule>();
world.import <Input::InputModule>();
world.import <Asset::AssetModule>();
Asset::AssetManager manager;
manager.register_asset_type<int>(world);
auto handle0 = manager.load<int>(world, "hi");
auto handle1 = manager.load<int>(world, "hi");
auto handle2 = manager.load<int>(world, "hi2");
#ifndef NDEBUG
world.import <flecs::stats>();