Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Error adding schemas. #104

Open
Redsham opened this issue Aug 15, 2022 · 0 comments
Open

Bug: Error adding schemas. #104

Redsham opened this issue Aug 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Redsham
Copy link

Redsham commented Aug 15, 2022

Describe the bug

  • What are you trying to do?
    I am making a vehicle save system in my game.
  • What do you think should happen?
    Using reflection, I get those fields of objects that need to be saved and add them to the "Behaviour" class. After this operation is done with all objects, I create the "VehicleSave" structure and serialize it using Ceras, after that I write it to disk.
  • What is actually happening?
    In fact, when serializing, an error is thrown with the following text: "InvalidOperationException: Can't write schema (Type: VehicleSaveSystem+VehicleSave) that doesn't match the primary. This is a bug, please report it on GitHub!". I added the type indicating part, the type is taken from the schema, which could not be written. Up to some point, the error gave the Beam type ("InvalidOperationException: Can't write schema (Beam) that doesn't match the primary. This is a bug, please report it on GitHub! ").

How to reproduce the bug

  • Post your SerializerConfig
           var config = new SerializerConfig();
           config.VersionTolerance.Mode = VersionToleranceMode.Standard;
           config.Advanced.AotMode = AotMode.None;
           CerasUnityFormatters.ApplyToConfig(config);

Platform

  • Which version of Ceras are you using? net4.5, net4.7+, or netstandard2.0?
    net4.7+
  • Are you using Unity? If so, what version? (2018.1, 2018.2, ...)
    Unity 2021.3.0f1
  • If you are using Unity, are you using IL2CPP?
    No
@Redsham Redsham added the bug Something isn't working label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants