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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment