Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset Hot Reloading #1

Open
SpinnerX opened this issue Jun 2, 2024 · 0 comments
Open

Asset Hot Reloading #1

SpinnerX opened this issue Jun 2, 2024 · 0 comments

Comments

@SpinnerX
Copy link
Member

SpinnerX commented Jun 2, 2024

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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant