Facepunch / sbox-issues

175 stars 12 forks source link

Cloud Assets overriding Local Assets of the same name #5900

Closed CarsonKompon closed 1 month ago

CarsonKompon commented 3 months ago

Describe the bug

Ever since any file type could be uploaded to sbox.game, the Asset Browser will prioritize and cache the cloud versions of assets over local versions.

This means downloading an asset with the path /scenes/minimal.scene and having your own local asset in the same path will cause the local file to not be shown in the Asset Browser and any references to /scenes/minimal.scene will reference the Cloud Asset instead.

To Reproduce

  1. Create a new prefab in your Assets folder with the path scenes/tests/cube.prefab
  2. Place a green sphere in the prefab so it is obvious that the prefab is yours
  3. Place some in your scene and save it.
  4. Visit the Cloud section of the Asset Browser and click on the Pink Cube by Garry Newman to download it
  5. Once the asset has been downloaded from the cloud, go back to your local scenes/tests folder, and notice that your local cube.prefab is nowhere to be seen.
  6. If you close your scene and re-open it, the prefabs will now all likely be pink cubes (the cloud prefab) instead of green spheres (the local prefab)

Expected behavior

Both should be able to co-exist. I imagine lost of people will end up overlapping file names like this.

Maybe these assets can be placed in their own subfolder (something like full.ident/scenes/tests/cube.prefab)

Media/Files

No response

Additional context

No response

ghost commented 2 months ago

This issue ruined my life

solwllms commented 1 month ago

Prioritising project assets over the cloud cache now, which should fix most of the pain around this (and actually enables some cool stuff like texture swaps).

If the ability to reference both ends up being a big thing, we can look at a solution for that down the road, but hoping that's actually quite niche and complexity we can avoid.