stride3d / stride3d/stride

[Asset] Valid default UrlReference prevent building

Open
#783 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Asset bug priority-Low work-estimate-S
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Github

Version: Latest

Platform(s): Any

Describe the bug
public UrlReference SomeRefs = new UrlReference( "MainScene" );
Prevents building the game and logs an error when loading a game in the editor even if the url provided is valid.

To Reproduce
Steps to reproduce the behavior:

  1. Spawn the 'New game' template
  2. Add public UrlReference SomeRefs = new UrlReference( "MainScene" ); to one of the scripts.(and using Stride.Core.Serialization;)
  3. Reload the assembly
  4. Check the log window / broken reference on the field.

Expected behavior
Providing a default implementation that has a valid url should work. And if an invalid one has to throw it should be more explicit.

Log and callstacks
urlerror.txt

Additional context
You will have to remove the url property from the scene file after saving a scene to force stride to process the default value for that field again, otherwise it'll just throw with an empty url issue.

Pinging @dfkeenan to see if he can fix this really fast or has some additional insight into this issue.

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 with UrlReference in Stride.Core.Serialization and reproduce the issue using the New game template and the default value shown in the report. Review urlerror.txt and the editor's broken-reference behavior. Done means a valid default URL no longer prevents building or logs an erroneous reference, while invalid URLs produce an explicit error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev, tooling
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.