jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

alternative fix for #185 without ifdefs #194

Closed SugoiDev closed 7 years ago

SugoiDev commented 7 years ago

This is an alternative PR for #187

It uses lists and adds a single callback to the EditorApplication.update delegate. It is based on a solution I use internally and the comment @jacobdufault made on #187.

I quickly tested and it seems to work, but would appreciate a review before merging.


I'm amazed I hadn't noticed this issue until @hymerman mentioned. I guess I just crash Unity so much that I rarely go long enough for it to became apparent.

Today, I just left Unity sit open and active for a few hours (the computer didn't sleep because Windows) and when I came back I though I had a memory leak on my mesh generation. Turns out it was this issue. It was allocating over a megabyte per frame!

Really glad @hymerman brought this up!

SugoiDev commented 7 years ago

A trivial merge will be needed to have both this and #193

jacobdufault commented 7 years ago

Thanks! I'm going to submit a follow-up commit to address a few small nits.