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
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
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();
}