Use the Assets plugin for handling RenderMesh creation #1413
Labels
A-Engine
B-Assets
B-Rendering
B-Voxels
P-Urgent
This issue is a big priority, and it would be good to close it ASAP
Problem
Currently, the render mesh plugin is a bit (very) cursed because it performs reference counting and garbage collecting on the created render meshes. This is the kind of task that the assets plugin was created to solve. We shouldn't duplicate its logic.
Solution
We could make the render meshes assets.
E.g.,
RenderMesh
would be an asset, loaded by aRenderMeshBridge
, associated to the.mesh
format, or something like that.The
.mesh.meta
would specify the original source which produces this mesh, which would be used to generate the mesh, instead of loading it from a.mesh
file - i.e., the.mesh
file doesn't exist in this case, only the.meta
.We should make sure that it is still easy to procedurally generate grids and create render meshes from them. I think that with this change it would be very weird, we might need to add some method to
Assets
to create a new asset with a given .meta and call the corresponding bridge, or something like that 🤔The text was updated successfully, but these errors were encountered: