When developing the UI Editor, we need to have some way of loading the assets from the editor's runtime. Still open for discussions.
Quick Examples
These are examples of how I can see the API would look as we look further into our asset system.
// Option #1 - Loading in a texture by supplying it a handler that knows where we want to load this texture from and where.
Ref<Texture2D> texture = AssetManager::Get<Texture2D>(handler);
if(texture.IsLoaded()){
Render(texture);
}
// Option #2 - having asset also represent our objects textures/shaders, uniforms, and other properties
AssetObject asset = Asset::Load("assets/backpack.obj");
if(asset.IsLoaded()){
Render(asset);
}
When developing the UI Editor, we need to have some way of loading the assets from the editor's runtime. Still open for discussions.
Quick Examples
These are examples of how I can see the API would look as we look further into our asset system.