I am making a game engine with C++ and OpenGL. Currently I'm stuck making the asset explorer. I would like to be able to import assets into an engine project and then when I open the project just use them in various game scenes (like in Unity). However the only thing I am doing right now is loading everything from the 'Assets' folder of the opened editor project. That is incredibly slow even when done asynchronously with multithreading. I don't understand how does Unity load assets so fast. I've noticed that it takes a while to import the assets for the first time but then it's very fast anytime you open the project after the first import. Is there any way to cache loaded assets? And should I generate all the buffers for OpenGL right on the asset import or should I wait for the asset to be 'used'?
All imported assets can be inspected like that, and then you can use them in the scenes (for example drag and drop a model into the scene):