stride3d / stride3d/stride

Executable project is not considered for serialization type resolution

Open
#879 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Release Type: Official Release/GitHub (either)

Version: master

Platform(s): N/A

Describe the bug
In the Stride.Core.Assets.Package we only consider library assemblies to be loaded. This means if I have a script in my executable it would not be resolved for deserialization.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty .NET Console application (with a solution)
  2. Include Stride packages (Stride.Engine and Stride.Core.Assets.CompilerApp)
  3. Create Assets folder in the project directory
  4. Run GameStudio on the solution to add in the GameSettings, MainScene, GraphicsCompositor
  5. Create a Script in the project

It's not possible to add the script to the scene in GameStudio. If added "by force" to the MainScene file, the AssetCompiler will warn that YamlSerializer couldn't deserialize it.

Expected behavior
It should be possible to create a single assembly game and have the same behavior as with library projects.

Additional context
I have modified the Package.cs on my dev branch to fix it:
https://github.com/manio143/stride/blob/f67805d7c6a00fb5a57dd17f6b8e46933ffc9d2e/sources/assets/Stride.Core.Assets/Package.cs#L1038-L1054
I will observe for a while if there's any issues and if not I'll submit a proper PR

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 sources/assets/Stride.Core.Assets/Package.cs, especially the linked lines around 1038-1054, and reproduce the issue with a .NET console project containing Stride.Engine and Stride.Core.Assets.CompilerApp. Use GameStudio and the AssetCompiler with a script in the executable; done means the script can be added to MainScene and YamlSerializer resolves it without warnings.

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
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.