Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load assets when the root asset/folder name has # prefix #2282

Open
Basewq opened this issue May 26, 2024 · 4 comments
Open

Can't load assets when the root asset/folder name has # prefix #2282

Basewq opened this issue May 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Basewq
Copy link
Contributor

Basewq commented May 26, 2024

Release Type: Official Release

Version: 4.2.0.2122 (affects 4.1 as well)

Platform(s): Windows

Describe the bug
Naming a root asset folder or root asset with # prefix will not load the content.

To Reproduce
Steps to reproduce the behavior:

  1. Create 'New game' project
  2. Rename 'MainScene' asset to '#MainScene' (alternatively make a folder called #Scene and move MainScene in there)
  3. Run game

Expected behavior
Game scene should load.

Additional context
Potentially a YAML loading bug, since # prefix represents a comment.

Workaround
Use a different symbol to prefix, eg. $, !, @, etc.

@Basewq Basewq added the bug Something isn't working label May 26, 2024
@Eideren
Copy link
Collaborator

Eideren commented May 26, 2024

Pinging @IXLLEGACYIXL just to make sure that's something you're aware of for your current yaml rework

@IXLLEGACYIXL
Copy link
Collaborator

IXLLEGACYIXL commented May 26, 2024

the root assets name isnt even stored in the yaml
the file name decides the root assets name

@IXLLEGACYIXL
Copy link
Collaborator

having special tags in a string should trigger quoting automatically, which the current one and mine do

@Basewq
Copy link
Contributor Author

Basewq commented May 26, 2024

Sorry I haven't really looked into this as I'm looking at other things, so it might not be a YAML issue. The steps to make the issue happen should be reproducible easily.

Only reason why I speculated on YAML, is because I noticed the diff in file in GameSettings.sdgamesettings

-DefaultScene: 98c3bc8c-99b9-4bd6-a0d3-a4aec9d94845:MainScene
+DefaultScene: 98c3bc8c-99b9-4bd6-a0d3-a4aec9d94845:#MainScene

and then the scene no longer loaded.
I guess GameSettings.DefaultScene stores the scene reference differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants