AssetManager Discussion

See of Github discussion here: Fixed loading linked child nodes. by JavaSaBr · Pull Request #818 · jMonkeyEngine/jmonkeyengine · GitHub

There was some discussion related to the state of the AssetManager and possible reworks. Before anything should be attempted in code, first should be decided what is the actual target. This topic is for discussing this.


  • The current assetmanager does nto handle consistently what is an critical error and what is a warning

  • There are different views related on what should be critical, so a flexibile solution might be beneficial

  • There is no clear separation possible between editor and production use, as some users would for example prefer a fallback texture at production build, while others would prefer a hard exception, a solution should ideally cover both extremes and the middleground.

  • It would be nice to have the ability to provide fallbacks by code. Eg. for a editor load a model even with missing texture and substitute with a fallback one.

  • It would be nice to be able to get detailed feedback from loaders. Eg. not only using a fallbacktexture, but also saying so, or even provide a fallbackcallback that is called for this.

  • Maybee the assetlistener could be extended to be used for something like this.

  • It would be nice to be able to use multiple loaders for one extension. E.g different fnt loaders

  • It would be good, if a new api does not cause much more code for the engine, as editor specific fallbacks should be coded in the editor, only the ability to do so should be offered.

Please add your own opinions, add more details, so we hopefully have something similar to requirements in the end. (And hopefully some way to fix all of this then)


I think the option with additional asset listeners will be ok. When a loader can’t find something, it should notify about this the asset manager which will decide what should do in this case. In the production mode, you can just throw an exception, in the editor mode, you can do someting else.

Funny how all of this was discussed already and the SDK being the reason for things like the AssetListener etc. all of this could have been extended further along the lines of the SDK “reference implementation” if there had been any collaborators :wink:

I’ll try to familiarize myself more deeply with the code this weekend and reconcile that with my own notes. I’ll post back with anything I come up with (or just implement it if it’s stupid-obvious… source control is entirely mutable after all.)

Edit: and note I had to do that anyway to figure out how I will deal with having two different FNT loaders at the same time. :slight_smile: