Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2018.4
2019.1
2019.2
2019.3
2020.1
2020.2
2020.2.0a5
Issue ID
1233556
Regression
No
[Other] "AddAssetToSameFile failed" exception thrown on adding Script on the Preset of the Animation State
"AddAssetToSameFile failed" exception thrown on adding Script on the Preset of the Animation State. Script can be added to the Animation State but not on Preset. Also added script cant be removed and throwing error of SerializedObject target has been destroyed.
Steps to Repro:
1. Open the attached Project
2. Click on the Assets > AnimatorState > Inspector > Add Behaviour > New Script
Expected Result:
There should not be any error
Actual Result:
AddAssetToSameFile failed because the other asset AnimatorState is not persistent error thrown
Reproducible on: 2020.2.0a5, 2020.1.0b4, 2019.3.7f1, 2019.2. 12f1, 2019.1.14f1, 2018.4.17f1
Environment: Windows 10 and Mac 10.14
Stack Trace:
1. AddAssetToSameFile failed because the other asset AnimatorState is not persistent
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
2. SerializedObject target has been destroyed.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
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
- NullReferenceException when setting 'isTextObjectScaleStatic' to false on a disabled TextMeshPro GameObject
- Shader Stripping Custom Options disappear when exiting Play mode without reloading Domain
- Decals do not get projected when 'Rendering Layer Mask' on a GameObject is 23rd Layer or above due to encoding/decoding issues
- Deriving from SearchContextAttribute doesn't always work
- Scripting API documentation is missing for macOS editor extensions
Resolution Note (fix version 2021.2):
Bug has been fixed and added unit test to cover this functionality