Hiya,
I’ve some code that entry belongings bundle by the assetManager and works high-quality at runtime.
I’d need this code to additionally run in edit mode, however the loading fails in that case.
How do you entry belongings programmatically whereas in edit mode ?
I’m in 3.6.
Thanks upfront.
Any thought ? I don’t discover something in docs or api.
loadAny works in editmode to load one file however I have to load a whole bundle not understanding upfront all the pieces it accommodates.
loadAny doesn’t appear to have the ability to load a bundle from what I’m making an attempt.
I regarded on the implemetation of the loadBundle methodology within the engine and it does use loadAny.
In case you nameassetManager.loadAny({url : "bundleName", preset: "bundle", ext: "bundle", __isNative__: "true"}, (error, information) => { if (error != null) { console.error(error); } console.log(information); })
Like it’s completed within the loadBundle implementation, it does offer you an object at runtime.
However at edit time it provides a “Load bundlePath/index.js failed!” error.
For the reason that editor is ready to entry all of the information to suggest them once you click on on a property of a sort that extends Asset, there needs to be a technique to do the identical type of parsing in a code that runs at edit time.
However I but have to seek out how.
1 Like