Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.2.X, 2022.1.X

Votes

0

Found in

2019.4

2020.3

2020.3.18f1

2021.2

2022.1

2022.2

Issue ID

1397381

Regression

No

PreserveAttribute is ignored in core assemblies like "System" or "Microsoft"

Scripting

-

Reproduction steps:
1. Open the user's attached project
2. Build and Run
3. Open Player Log

Expected result: No JsonSerializationExceptions were logged
Actual result: A JsonSerializationException was logged

Reproducible with: 2019.4.34f1, 2020.3.26f1, 2021.2.8f1, 2022.1.0b6, 2022.2.0a3

The logged exception: JsonSerializationException: Unable to find a constructor to use for type Microsoft.Whatever.MyTestChildObject. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Name', line 1, position 8

  1. Resolution Note (fix version 2022.2):

    Fixed in 2022.2.0a5

  2. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0b10

  3. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.14f1

  4. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.31f1

  5. Resolution Note (fix version 2019.4):

    Fixed in 2019.4.38f1

Add comment

Log in to post comment