keenanwoodall / Deform

A fully-featured deformer system for Unity that lets you stack effects to animate models in real-time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moving the lattice to the root of the scene causes exceptions

rlalance opened this issue · comments

Describe the bug
I was debugging another lattice issue when this came up.
I took a simple rock mesh(No LOD) and applied a deformable to it. I added a lattice deform and moved the lattice out into the root of the scene.

To Reproduce
Steps to reproduce the behavior:

  1. Add a mesh to your scene.
  2. Using the creator window, add deformable
  3. Using the creator window, add a lattice
  4. Select the lattice in the hierarchy window and unparent it by moving at the root of the scene.
  5. Notice a bunch of exceptions showing in the console.

Expected behavior
No exceptions show, the mesh is deformed correctly

Video
https://user-images.githubusercontent.com/1323032/207908781-0468230b-43f8-4942-b8ae-f746bb4bd3d3.mp4

** Logs

Deform.LatticeDeformer.get_CanAutoFitBounds () (at Assets/Deform/Code/Runtime/Mesh/Deformers/LatticeDeformer.cs:23)
DeformEditor.LatticeDeformerEditor.OnInspectorGUI () (at Assets/Deform/Code/Editor/Mesh/Deformers/LatticeDeformerEditor.cs:111)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <46976ad9004e4c8ca11353e8bb94e264>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
  • OS: Windows 10
  • Unity: 2021.3.11f1
  • Deform version: 1.2.1

Thanks for the report, and video (great song XD)
I pushed a quick fix to the develop branch 👍

Great! Nice work!