You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In edit mode, if a mesh is instantiated and a latticedeformer added to it, it's scale will be changed to match the size of the bounds of the mesh. Doing the same thing in play mode will keep its original scale.
To Reproduce
Make some editor script that instantiates a mesh with bounds different from (1,1,1) and adds a latticedeformer to it, and run it both in edit and play mode. Something like:
Expected behavior
Scale doesn't change when script is run in edit mode.
OS: Windows 10
Unity: 2021.2.10
Deform version: 1.2.1
Additional context
The scale change is done when LatticeDeformer.Reset() is called by the editor. I think the problem is that this function should not be named Reset as it is one of Unity's "special functions". Renaming Reset to Reconstruct fixes the issue. I'm also not sure why Reset/Reconstruct changes the scale of the mesh, it doesn't seem needed for LatticeDeformer to work.
The text was updated successfully, but these errors were encountered:
Describe the bug
In edit mode, if a mesh is instantiated and a latticedeformer added to it, it's scale will be changed to match the size of the bounds of the mesh. Doing the same thing in play mode will keep its original scale.
To Reproduce
Make some editor script that instantiates a mesh with bounds different from (1,1,1) and adds a latticedeformer to it, and run it both in edit and play mode. Something like:
Expected behavior
Scale doesn't change when script is run in edit mode.
Additional context
The scale change is done when LatticeDeformer.Reset() is called by the editor. I think the problem is that this function should not be named Reset as it is one of Unity's "special functions". Renaming Reset to Reconstruct fixes the issue. I'm also not sure why Reset/Reconstruct changes the scale of the mesh, it doesn't seem needed for LatticeDeformer to work.
The text was updated successfully, but these errors were encountered: