[Asset] Valid default UrlReference prevent building
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: 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:
- Spawn the 'New game' template
- Add
public UrlReference SomeRefs = new UrlReference( "MainScene" );to one of the scripts.(andusing Stride.Core.Serialization;) - Reload the assembly
- 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
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
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