rewin123 / space_editor

bevy prefab editor
MIT License
386 stars 49 forks source link

Gltf import is wrong when not executing in app directory #297

Closed DasLixou closed 5 months ago

DasLixou commented 7 months ago

Describe the bug

ERROR bevy_asset::server: Path not found: C:\path\to\project\editor\assets\my_asset.glb

The asset is in C:\path\to\project\assets\my_asset.glb and it gets selected.. somewhat correct (have to go one folder up and then am somehow in "C:\" but its the correct folder, but when I select it, the path in the error adds the \editor directory and fails.

To Reproduce Have a cargo workspace with an editor member where the editor is and load a gltf which is not in .\editor\assets\ but in .\assets\

Expected behavior Load the correct file

Screenshots image

Desktop (please complete the following information):

naomijub commented 7 months ago

@rewin123 v0.6? I think I have an idea where this happens, but not sure if I will be able to tackle it

naomijub commented 7 months ago

Will try to deal with this until saturaday

naomijub commented 7 months ago

do you have an open source repo I could fork to look into this? I was not able to reproduce

naomijub commented 7 months ago

So, looking around, we hardcoded the gltf and glb to be at path assets/models/.

There is some circular dependencies between the multiple crates to solve that, but I will try to figure it. This should solve your issue. While I at it, could you please try moving your glb files to assets/models/?

rewin123 commented 6 months ago

Sorry for long waiting. Will try to fix hardcode path on this week

rewin123 commented 5 months ago

I have restored the conditions described in Issue and everything works on main