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
- MSAA warnings are thrown when custom post-processing is used and the Scene contains transparent GameObjects
- Texture looks point-sampled when Mipmap Streaming is enabled
- Assigned font's bold/font-weight styles render using Default Font's assets when Default Font has corresponding style assets defined in TMP Settings
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
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.