Is it doable to dynamically load/name asset with out utilizing assets
in Cocos Creator 3.5.0 ?
I do know that it will works:
assets.load("test_assets/picture/spriteFrame", SpriteFrame, (err, spriteFrame) => {
this.node.getComponent(Sprite).spriteFrame = spriteFrame;
});
However because of the legacy folder construction, the previous property are positioned outdoors the assets folder. And there are tons of it, I need to keep away from shifting these oldies.
Let’s say the folder construction is one thing like this:
property
|- Pictures
|- Background
|- bg_mdl.png
|- bg_rn.png
|- Sources
..
..
So, what i need is to dynamically assign this bg_mdl.png
and bg_rn.png
right into a sprite node within the scene.
I’m utilizing Cocos Creator 3.5.0 and Typescript. Is it doable to do it?