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
- Incorrect vehicle rotation when using ForceMode.VelocityChange
- [Linux] Dropdown Menus are filled with empty entries when the Menu intersects with the Editors borders
- [HDRP] [Metal] Tiled artefacts when using DRS
- [HDRP] Empty template starts with incorrect Physically Based Sky ground
- Big chunk of "Untracked" memory in the Memory Profiler screenshot when a custom .obj file is loaded while in Play Mode
Add comment