[Asset] List mixing refs and inline values can fail to deserialize properly
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: Any
Version: Latest as of writing
Describe the bug
Works as expected when loading up the project, on the next reload of the source it will fail during yaml serialization.
To Reproduce
Steps to reproduce the behavior:
- Use the following snippet
public class TestRenderer : SceneRendererBase
{
protected override void DrawCore(RenderContext context, RenderDrawContext drawContext){}
}
- Add this new renderer to the graphics compositor.
- Save the project.
- Make any change to your source.
- Notice the gamestudio failing to reload the assembly.
When the assembly is reloaded, for some godforsaken reason, the serializer fetches the ID of the DebugRenderer and attempts to cast TestRenderer to IIdentifiable, see stacktrace.
Log and callstacks
Stacktrace after making any change in the source while the gamestudio is open.
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 the TestRenderer reproducer in the issue and inspect the linked stack trace. Trace YAML serialization during the GameStudio assembly reload, focusing on the attempt to fetch DebugRenderer's ID and cast TestRenderer to IIdentifiable. Done means the project reloads successfully after a source change when a list mixes references and inline values.
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