Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

SerializationException: Type 'System.Random' in Assembly 'mscorlib' is not marked as serializable.

Discussion in '2021.2 Beta' started by StageClearStudios, Aug 19, 2021.

  1. StageClearStudios

    StageClearStudios

    Joined:
    Jan 30, 2018
    Posts:
    40
    Hello!

    We've upgraded our project to 2021.2.0b7 and we've an issue with BinaryFormatter System.Random serialization:

    SerializationException: Type 'System.Random' in Assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

    Is this a problem with .NET and BinaryFormatter?

    Thank you in advance!
    Best!