Search Issue Tracker

Won't Fix



Found in





Issue ID




ISerializationCallback.OnBeforeSerialize sometimes fail to access a reference to ScriptableObject asset



How to reproduce:
1. Open the user-submitted project ("")
2. Observe the console errors (Enter and leave Play mode if the errors are not present)
3. Try to rename one of the non-accessible Scriptable Assets and enter Play Mode again
4. Observe that their name/path hasn't updated in the error message
5. Build and run the Player (As a development build) and observe that the paths are updated and no errors are thrown

Expected result: All of the assets get referenced correctly and no errors are thrown
Actual result: Some of the assets don't get referenced correctly and throw errors in Editor only

Reproduced in: 2019.1.0a12, 2018.3.1f1, 2017.4.17f1

Note: The Scriptable assets that return null when referenced are not always the same and differ from version to version

  1. Response avatar

    Resolution Note:

    Unity APIs should not be accessed in the ISerializationCallback callbacks and might not work correctly when used. These callbacks main purpose is to allow users to add serialization support of types that the Unity serialization does not support. Unfortunately, we cannot block usage of the Unity APIs in these callbacks, as some use cases work and it would therefore be a breaking change.

    A bit more background info on this:

    We won't fix this issue and if you have a use case that is not currently supported with our existing API, please file a feature request through the Unity Feedback website:

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.