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
- PlayerLoop.SetPlayerLoop() function is ignored when playing game in Player
- Lighting data is carried over from one Scene to another when changing Scenes in the Play Mode
- The <sprite> tag inserted image from a Sprite Asset into the UI Builder Button disappears when the Inlined Style Text Shadow Horizontal or Vertical Offset is set to be more than 0 px
- Build fails when building with ILCPP Scripting Backend and ARMv7 as the Target Architecture
- Textures turn black in Player when they are referenced by a script instance
Add comment