Search Issue Tracker

By Design

Votes

0

Found in

2017.4.0f1

2018.4.0f1

2019.1.0a1

2019.2.0a1

2019.2.0a14

2019.3.0a1

Issue ID

1154016

Regression

No

Script Execution Order doesn't respect the order when deserialization is called

Scripting

-

How to reproduce:
1. Open attached project
2. Change Script Execution Order of ScriptableObjectA and ScriptableObjectB B first, A second.
3. Select any Script and perform Reimport
4. Check the Console

Reproducible with: 2017.4.27f1, 2018.4.0f1, 2019.1.3f1, 2019.2.0b2, 2019.3.0a2

Expected results: "after deserialize A" and "after deserialize B" are in the same order as "enabling A" and "enabling B"
Actual results: order of "after deserialize" logs is unaffected by Script Execution Order while order of "enabling" is affected by Script Execution Order

  1. Resolution Note (2020.1.X):

    Deserialization order of objects is undefined and the ISerializationCallbackReceiver callbacks are invoked during derialization.

    Script Execution Order only affects the callbacks on MonoBehaviour and ScriptableObject and not on ISerializationCallbackReceiver.

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.