Search Issue Tracker
Won't Fix
Votes
2
Found in
4.6.0b17
Issue ID
628125
Regression
No
[Mesh]Changing the 'mesh.vertices' of a mesh of a mesh filter through an editor extension, undo fails.
When changing the 'mesh.vertices' of a mesh of a mesh filter through an editor extension, undo fails to work.
When the vertex array of a shared mesh is replaced by an editor extension, this operation cannot be undone correctly.
Steps to repro:
1. Open the attached project
2. Open 'Test' scene
3. In the scene view select 'Capsule'
4. Press 'i' button to modify its vertices
5. Now undo the action
Result:Mesh does not undo, capsule stays the same size.
Expected Results:Mesh should return to previous size.
Notes:
In the scene you can press 'o' that simply updates vertices <mesh.vertices = mesh.vertices>, then undo and the mesh will return to its original size.
If you follow these steps:
1. Duplicate the capsule
2. Press 'i' once
3. Undo the action
Everything works fine as the entire Mesh object has been replaced this time around. Note that hitting 'i' more than once will again lead to the bug described above.
Repro'd in 4.7.2, 5.0.2f1, 5.5.0f1 WIN & OSX
Comments (1)
-
Zyl
Nov 13, 2017 12:48
Having the same problem. Currently need to rebuild all meshes of selected GameObjects when undoing, which causes a fairly annoying delay (mostly because of rebuilding secondary UVs) especially when intending to undo a bunch of operations. Strangely, the undo operation appears to have succeeded when making other changes to the scene, saving it, and restarting the editor. I tried setting sharedMesh to null and back to the Mesh (a trick known to help with MeshCollider not updating Mesh changes), but that does not help here.
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
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
Resolution Note:
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.