Search Issue Tracker
By Design
Votes
0
Found in
2018.4.33f1
2019.3.0f5
2020.3
2021.1
2021.2
Issue ID
1328553
Regression
Yes
Nested asset name will not update in Project View if renamed from a script
How to reproduce:
1. Open the attached project
2. Select TestAsset in the Project View
3. In the Inspector type in a new name at Nested Asset Name
4. Click Rename Nested Asset to
5. Observe Project View
Expected result: The nested asset is renamed in Project View
Actual result: The nested asset is not renamed in Project View
Reproducible with: 2019.3.0f5, 2019.4.23f1, 2020.3.4f1, 2021.1.3f1, 2021.2.0a13
Not reproducible with:2018.4.33f1, 2019.3.0f4
Could not test with:
Notes:
1. 2020.3, 2021.1, 2021.2 streams update Project View but throw a console warning
2. The asset will not get renamed in Project View in 2020.3.4f1 about 1/50 times
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Long Property names are not truncated in the Add Property dropdown in the Animation window when the Long Property name does not fit
- [iOS] High CPU load when device keyboard is open
- Selected Animation clip in the Animation window changes when the Domain Reload is triggered
- Animation window scrollbar keeps resetting when the scrollbar width is changed after adding an event
- LocalizationSettings.InitializationOperation hangs when re-entering Play Mode with Domain Reload disabled
Resolution Note (2021.2.X):
The WeaponEditor.Rename() method in the repro isn't doing rename correct.
1) It is modifying the name of the main asset - not the nested asset object
2) Modifying an native asset in memory and calling ImportAsset, isn't the right way to save asset object memory changes. AssetDatabase.SaveAssets() should be called instead.
This implementation of the Rename() method works:
private void Rename()
{
serializedObject.targetObject.name = effectName;
AssetDatabase.SaveAssets();
}