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
- WebGL Development builds ignore the "Compression Format" setting when using "Gzip" compression
- [tvOS] Project crashes on startup on Apple TV simulator (both X86_64 and ARM64 architectures)
- Context menus open on a different monitor when there are three monitors used
- Crash on Umbra::QueryExt::queryStaticShadowCasters when opening a specific project
- Crash on GfxDeviceD3D12Base::DrawBuffersCommon when opening a specific project
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();
}