Can't load assets when the root asset/folder name has # prefix
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
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:
- Create 'New game' project
- Rename 'MainScene' asset to '#MainScene' (alternatively make a folder called
#Sceneand move MainScene in there) - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Create a new game project, rename MainScene to #MainScene or place it in a #Scene folder, and run the game to reproduce the missing scene load. Start by tracing root asset loading and the YAML handling suggested in the report; done means the scene loads when the root asset or folder name begins with #, without requiring the workaround symbols.
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
- 42/100