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
I am currently using the MeshSmoother together with the Outline shading using the MRTK2 shader. In our scenario, this needs to be done and undone programatically and leaving the original mesh untoched. It just so happens that when the MeshSmoother component is destroyed, its OnDestroy method wipes out the object mesh and I can't show the original object anymore.
Expected behavior
MeshSmoother.OnDestroy not having the desctructive behavior.
Additional context
I realize that the smoothed normals are written to the UV2 channel and I might as well just keep them until the object is actually destroyed but I don't think the fix I suggested as any downsides and has the upside of being able to safely remove a MeshSmoother component without issues.
Another problem is that you can't use MeshOutlineHierarchy if you want to disable outlines since it can only be destroyed. It doesn't implement OnEnable/OnDisable. My workaround is to disable MeshOutline components instead of destroying them.
The text was updated successfully, but these errors were encountered:
Original issue: microsoft/MixedRealityToolkit-Unity#9307
Describe the bug
I am currently using the MeshSmoother together with the Outline shading using the MRTK2 shader. In our scenario, this needs to be done and undone programatically and leaving the original mesh untoched. It just so happens that when the MeshSmoother component is destroyed, its OnDestroy method wipes out the object mesh and I can't show the original object anymore.
Expected behavior
MeshSmoother.OnDestroy not having the desctructive behavior.
Additional context
I realize that the smoothed normals are written to the UV2 channel and I might as well just keep them until the object is actually destroyed but I don't think the fix I suggested as any downsides and has the upside of being able to safely remove a MeshSmoother component without issues.
Another problem is that you can't use MeshOutlineHierarchy if you want to disable outlines since it can only be destroyed. It doesn't implement OnEnable/OnDisable. My workaround is to disable MeshOutline components instead of destroying them.
The text was updated successfully, but these errors were encountered: