Search Issue Tracker

By Design

Votes

1

Found in

2017.4.0f1

2018.4.0f1

2019.1.0a1

2019.1.2f1

2019.2.0a1

2019.3.0a1

Issue ID

1171276

Regression

No

'Serialization depth limit 7 exceeded...' warning is thrown when declaring a private property

Scripting

-

How to reproduce:
1. Open user's attached project and 'SampleScene' scene
2. In Console window inspect thrown warning

Expected result: no warning message is thrown
Actual result: "Serialization depth limit 7 exceeded at 'EasyBezier::BezierPoint.<TestPath>k__BackingField'. There may be an object composition cycle in one or more of your serialized classes." warning message is thrown

Reproducible with: 2017.4.30f1, 2018.4.5f1, 2019.1.12f1, 2019.2.0b10, 2019.3.0a11

  1. Resolution Note:

    This is by design and undocumented.

    Unity serializes all serializable private fields when reloading assemblies to make it easier to make hot reloading of code in play mode work. E.g. less fields have to be updated. Private fields are not serialized in other serialization cases, such as when loading scenes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.