LinkedAssets aren't sharing meshes when imported

What’s the problem with BinaryImporter? Why would you use another importer? This is AssetLinkNode, which is designed to be used when the application is running. IMO, you don’t really want to be importing anything that’s not a J3O. A bigger issue is the lack of caching, since multiple AssetLinkNodes referencing the same model would mean it would be loaded several times without necessity (and without caching).

yes, and my PR fixes this issue.

That is the main issue, yes, what means that the AssetLinkNode is not doing it functionality. My fix is still using the BinaryImporter but I think that a prettier solution would be without using it (You say that I don’t really want to be importing anything that’s not a j3o but is this true the 100% of the times?, if there is a solution that can ensure it functionality even in those times you do, wouldn’t it be better?).
javasabr’s solution doesn’t use it (I didn’t try it neither).

BinaryImporter is used by javasabr’s PR, so it doesn’t fix your issue:

It fixes this, when I tested some scenes with many asset linked nodes, all meshed were reused between loaded models.

I was referring to this comment from @NemesisMate:

1 Like

It uses it but not in the savable’s read method but in the loader, a binary loader, so if another loader is used, the read method would still working (I though that that was the intention of using the JmeImporter interface).

My true issue is with the AssetLinkNode not doing it job, as long as this is solved I’m happy with it :slight_smile:

I think it was fixed after merging this PR: