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
{{ message }}
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
I'm finding that FullInspector slows my game down gradually, because it's building up a huge number of callbacks. Anything that uses fiLateBindings.EditorApplication.RemUpdateFunc and AddUpdateFunc suffers from this, and there are some parts of FullInspector that add an update function every 0.3 seconds.
It looks like taking a copy of the Action in fiLateBindingsBinder, instead of storing it as an actual UnityEditor.EditorApplication.CallbackFunction prevents Unity recognising and removing the callbacks - it must be doing an object equality check.
Changing the code to not make a copy fixes this - but means that Unity editor types are exposed in non-editor code, meaning any calls to fiLateBindings.EditorApplication.RemUpdateFunc have to be guarded with #if UNITY_EDITOR. I'll submit a PR shortly; perhaps you can think of a better fix though!
The text was updated successfully, but these errors were encountered:
hymerman
added a commit
to hymerman/fullinspector
that referenced
this issue
Nov 8, 2016
I'm finding that FullInspector slows my game down gradually, because it's building up a huge number of callbacks. Anything that uses
fiLateBindings.EditorApplication.RemUpdateFunc
andAddUpdateFunc
suffers from this, and there are some parts of FullInspector that add an update function every 0.3 seconds.It looks like taking a copy of the
Action
in fiLateBindingsBinder, instead of storing it as an actualUnityEditor.EditorApplication.CallbackFunction
prevents Unity recognising and removing the callbacks - it must be doing an object equality check.Changing the code to not make a copy fixes this - but means that Unity editor types are exposed in non-editor code, meaning any calls to
fiLateBindings.EditorApplication.RemUpdateFunc
have to be guarded with#if UNITY_EDITOR
. I'll submit a PR shortly; perhaps you can think of a better fix though!The text was updated successfully, but these errors were encountered: