You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Create Prefab
Place Prefab in a scene (now the green dot is shown on the prefab)
Call DataBaseFileProvider.ListFiles("Directory", "*", VirtualSearchOption.AllDirectories). with the directory where the prefab got saved
Inspect the array returned by the method
Expected behavior
The name of that prefab should be in that array.
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".
The text was updated successfully, but these errors were encountered:
It's worth pointing out that as soon as you reference the Prefab in a scriptcomponent with a public prefab field: public Prefab prefab;
It's working again.
The reason this isn't working as you expect is that placing a prefab in a scene is only referencing that prefab at compilation time. The entities are copied over to the scene and can also have modified properties from the original prefab. So this works without instantiating the prefab at runtime when the scene is initialized.
What is misleading here is the reference dot being turned on. On one hand it's correct - scene references the prefab as it is needed for compilation. On the other hand user expects to see referenced assets (green or blue dot) to be available at runtime.
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:
Expected behavior
The name of that prefab should be in that array.
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](https://private-user-images.githubusercontent.com/78092485/279547085-54b6ef1f-cac3-4078-8954-41d52b18eeee.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI2MTU5NzYsIm5iZiI6MTcyMjYxNTY3NiwicGF0aCI6Ii83ODA5MjQ4NS8yNzk1NDcwODUtNTRiNmVmMWYtY2FjMy00MDc4LTg5NTQtNDFkNTJiMThlZWVlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAyVDE2MjExNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2NzRlNWEzYTg1NDNmMDhlNWUzZGFjODM1NDBjM2ZmZjY4OWJhM2RlOGFhMTRkYzM2NWRmZWQ5YTVjY2EyMjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a8pXfUIojjiltfx1nYEFfTA5RKCbSK6trCZSEuQ776Y)
The text was updated successfully, but these errors were encountered: