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
- Selector gets stuck in UI if scroll is used while dragging
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
Resolution Note (fix version 2021.2):
Bug has been fixed and added unit test to cover this functionality