stride3d / stride3d/stride

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

Open
#2,282 4 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.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.

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.