Stride: GameSettings and Xenko.Navigation settings

Created on 11 Jan 2020  路  3Comments  路  Source: stride3d/stride

Release Type: Official Release

Version: 3.1.0.1

Platform(s): Windows

Describe the bug
Every sample template that does not contain Navigation subsection in the GameSettings asset will no longer be runnable after GameStudio adds back the Navigation subsection.
This is because the Xenko.Navigation reference is not included in the csproj file for those samples, and once GameSettings adds back the Navigation subsection it will try to load Xenko.Navigation.NavigationSettings, but obviously Xenko.Navigation does not exist so it'll crash.

You will get an error message saying:
Xenko.Core.Serialization.Contents.ContentManagerException: 'Unexpected exception while loading asset [GameSettings]. Reason: No serializer available for type id f6e78a35184f6fe1d27096e38ec09340 and base type Xenko.Data.Configuration. Check inner-exception for details.'

To Reproduce
Steps to reproduce the behavior:

  1. Create Third Person Platformer sample template.
  2. Edit any settings on the GameSettings asset.
  3. Save GameSettings.

Expected behavior
Project should still be runnable.

Workaround
In your game's csproj file, edit in a text editor (or use nuget package manager) and add
<PackageReference Include="Xenko.Navigation" Version="3.1.0.1" PrivateAssets="contentfiles;analyzers" />
Make sure this is the game csproj file (ie. you should already see package references to things like Xenko.Core and Xenko.Engine.

You may also want to add Xenko.Physics if it is also missing, ie.
<PackageReference Include="Xenko.Physics" Version="3.1.0.1" PrivateAssets="contentfiles;analyzers" />

area-Physics bug help wanted

Most helpful comment

Thanks for the report.

This editor adding Navigation settings in GameSettings was fine when Xenko was packaged as a single nuget (Xenko.Navigation was always referenced).
However, with the new plugin-based approach, editor shouldn't do this kind of thing anymore without checking first if Xenko.Navigation is being used.

Ideally editor itself should become plugin-based (i.e. referencing Xenko.Navigation in user project would load editor-time plugin for Xenko.Navigation which for example could update GameSettings to add NavigationSettings).

A quicker workaround while waiting for this plugin system would be to change editor code to add NavigationSettings only when appropriate (i.e. something reference Xenko.Navigation).

All 3 comments

We have also seen this.
(3.1.0.1 beta 2)

Thanks for the report.

This editor adding Navigation settings in GameSettings was fine when Xenko was packaged as a single nuget (Xenko.Navigation was always referenced).
However, with the new plugin-based approach, editor shouldn't do this kind of thing anymore without checking first if Xenko.Navigation is being used.

Ideally editor itself should become plugin-based (i.e. referencing Xenko.Navigation in user project would load editor-time plugin for Xenko.Navigation which for example could update GameSettings to add NavigationSettings).

A quicker workaround while waiting for this plugin system would be to change editor code to add NavigationSettings only when appropriate (i.e. something reference Xenko.Navigation).

+1
I just tested this in the default UI project, when I moved the Scenes and the MainLibrary(UI Library) into their own sub-folders then I had to reference the Xenko.Navigation in the Starup Project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WhitePhoera picture WhitePhoera  路  3Comments

Qibbi picture Qibbi  路  4Comments

CharlesWoodhill picture CharlesWoodhill  路  3Comments

jeske picture jeske  路  3Comments

Domvel picture Domvel  路  4Comments