stride3d / stride3d/stride

Moved/renamed Assets dont update UrlReference references

Open
#2,709 2 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.2381

Platform(s): Windows

Describe the bug
When you have an asset in the asset explorer that is referenced in a scene. Moving or renaming that asset will not update those references in the build.

To Reproduce
Steps to reproduce the behavior:

  1. Create a basic project
  2. reference the GameSettings Asset in a component using a UrlReference
  3. use Content.Load in that component script(just for seeing the error)
  4. when the asset is moved and the projects is rebuilt and run see the asset at the previous location

Expected behavior
references should be updated automatically.

Additional context
In the editor the reference Url does get updated but it just doesnt show in the actual build causing it to not be noticeable until you run the game.

public class TestComponent : StartupScript
{
    public UrlReference<GameSettings> Item { get; set; }

    public override void Start()
    {
        var item = Content.Load(Item);
    }
}

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 by reproducing the issue with a GameSettings asset referenced through UrlReference, then inspect how the asset explorer records moves or renames and how the build processes those references. Compare the updated editor UrlReference with the value used by Content.Load in the built game. Done means moved or renamed assets resolve to their new locations after rebuilding.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.