stride3d / stride

Stride Game Engine (formerly Xenko)
https://stride3d.net
MIT License
6.32k stars 917 forks source link

Editor bug import asset warning bug within the game project #2354

Open Basewq opened 4 days ago

Basewq commented 4 days ago

Release Type: Official Release

Version: 4.1.0.1948+

Platform(s): Editor

Describe the bug Adding a raw asset within the project solution and importing the asset warns importing assets are not inside resource folder when there is no ResourceFolders declared in the .sdpkg file. Hitting Ok also prompts if you want to copy the asset in the resource folder. Hitting Ok here will crash the editor.

The 'New game' template is one of the rare project templates that explicitly declare the resource folder in the .sdpkg file:

ResourceFolders:
    - !dir Resources

Other templates, eg TopDown RPG do not:

ResourceFolders: []

Futhermore, it places the Resource folder (and Asset folder) one level above the game project folder.

To Reproduce Steps to reproduce the behavior:

  1. Create TopDown RPG template
  2. Go to existing Resources folder, add new raw resource (or just use an existing asset) and drag-drop into the asset sub-window
  3. Observe warning(s)

Expected behavior Handle the special case where package's Resource folder(s) are not explicitly declared.

Additional context Original feature introduced #1781 Copy raw asset into resource folder feature added here #1827