slipster216 / VertexPaint

Unity 5.3 Vertex Painter
Other
906 stars 151 forks source link

Fix for high CPU/GPU usage. #31

Closed kenamis closed 4 years ago

kenamis commented 4 years ago

I noticed a high amount of cpu/gpu usage while the brush is active, even if nothing is happening in the scene/editor. I think this was because in the VertexPaint OnSceneGUI, repaint events aren't getting consumed before another repaint event being created at the end of the function. So, I added a check to only repaint on non-repaint events and then allowed the MouseMove event to pass through to the end of that function.