Run in Editor is not the same as Run in Integrated Browser
I found the animation in the script added into the asset didn't work well when running in Editor but it worked well in Integrated Browser and even Run In My Browser (HTTP). I didn't find differences between these run after diving deep into the codebase. Is there anything I missed?
Meanwhile, after building the project, the imported assets was not fully copied/pasted into scenes/_assets path. All animation file were not pasted. Is this intended? How should I make it work programmatically? Thank you!
Hi @eherozhao ! This not intended ! What is the format of the animation file? JSON?
@julien-moreau Nope. glb. The asset we used is this one. I was hosting the scene by uploading the scenes, dist and index.html file to remote server and the result is the same as Run in Editor which the animation was failing to work.
@eherozhao if I understand correctly, you'd like to have all files available in the assets folder available in the _assets folder. Do you confirm?
@julien-moreau Yes! I am not sure why Run in Integrated Browser works well but Run in Editor fails with the broken link to assets path.
It works in editor because the browsed assets folder is the assets folder at the root instead of the scenes/_assets.
I'm working on a solution right now
If I upload the whole project with the assets folder into remote server, the animation works well. However, based on my understanding, the smallest scope of making a scene work in a server is only scenes, dist and index.html so if I can only upload these folders and file and make it work, that will be the most efficient way.
I agree, the goal is to keep the assets folder only in the development project
Yep! Do you have any idea about how to optimize the process? Probably need to do some changes to the asset management?
Exact, but the philosophy here was to not copy the entire assets folder, only assets that are used in the project and only re-usable assets like textures, sounds, etc.
We should find a way to say "I want this asset to be available as-is in my project"
You are right! That's what I am thinking about. How should we let Editor know which assets are available? Using a cache once saving?
It works in editor because the browsed assets folder is the
assetsfolder at the root instead of thescenes/_assets. I'm working on a solution right now
To clarify, what issue was this solution aimed at? The Run in Editor is not the same as Run in Integrated Browser one? Will this solution include any fix about only assets that are used in the project and only re-usable assets like textures, sounds, etc. you mentioned?
@eherozhao all gltf/glb files are now copied in the assets output folder. I still have to add a way to tag assets "I want it to be copied"