stride3d / stride3d/stride

Assets not findable by Content.FileProvider.ListFiles(...)

Open
#2,020 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release

Version: 4.1.0.1948

Platform(s): Windows

Describe the bug
Prefabs which are placed in a scene (so they are "Included in build as Dependency") are not in the array that gets returned by DataBaseFileProvider.ListFiles("Directory", "*", VirtualSearchOption.AllDirectories).

To Reproduce
Steps to reproduce the behavior:

  1. Create Prefab
  2. Place Prefab in a scene (now the green dot is shown on the prefab)
  3. Call DataBaseFileProvider.ListFiles("Directory", "*", VirtualSearchOption.AllDirectories). with the directory where the prefab got saved
  4. Inspect the array returned by the method

Expected behavior
The name of that prefab should be in that array.

Screenshot 2023-11-01 015157

Code for reproducing this bug.
public override void Start() { var e = Content.FileProvider.ListFiles("", "*", Stride.Core.IO.VirtualSearchOption.TopDirectoryOnly); foreach (var element in e) { Log.Info(element); } }

No file named "TestEntity1".
Screenshot 2023-11-01 015457

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DataBaseFileProvider.ListFiles and reproduce the Windows case using a prefab placed in a scene, then inspect the returned array for the prefab name. Done means a prefab marked as included in the build as a dependency is returned when listing its saved directory with VirtualSearchOption.AllDirectories.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.