Search Issue Tracker
By Design
Votes
0
Found in
5.3.4p2
Issue ID
795751
Regression
No
Scriptable object holds references to no longer existing variables
Steps to reproduce:
1. Open attached project "795751.zip"
2. In hierarchy, notice scriptable object "FeatureToggle" and its script
3. Select "FeatureToggle" and notice that it references sprite
4. Open Scriptable object's script and comment out Sprite declaration, save script and return to editor
5. Select "FeatureToggle" scriptable object and notice that there's no Sprite field anymore
6. Right-click on scriptable object and select "Show in explorer"
7. Open asset file with text editor and notice that reference to sprite still exists
Additional steps:
8. In editor's top menu, click "SUPPORT > Build Bundles". Bundle will be built to "[ProjectRoot]/Bundles" folder
9. Open bundles location and open Bundles.manifest
10. Notice dependency between Sprite and Scriptable object bundles
Expected result: Reference is removed after scriptable object's script is edited
Actual result: Scriptable object needs to be marked as dirty manually for references to be updated
Workaround: After editing scriptable object's script, mark it dirty and save assets:
UnityEditor.EditorUtility.SetDirty(scriptObj);
AssetDatabase.SaveAssets();
Reproduced with: 5.1.4f1, 5.2.4f1, 5.3.4p6, 5.4.0b18
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Add comment