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
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
Add comment