Custom inspectors do not refresh mouse position properly
Issue #483
new
The method detailed in the manual to create a custom inspector which uses Odin does not properly refresh the position of the mouse for highlighting over elements, etc.
For example, in a non-custom Odin inspector, mousing over a preview field or a foldout will cause it to highlight and display extra content. In custom inspectors this does not happen, to get a preview field to show the "Select" button you have to double click on the preview icon.
I have fixed the issue manually with the line added at the end of the below code.
public override void OnInspectorGUI()
{
InspectorUtilities.BeginDrawPropertyTree(Tree, true);
//Draw some properties...
InspectorUtilities.EndDrawPropertyTree(Tree);
GUIHelper.CurrentWindow.wantsMouseMove = true; //This line allows the editor to update when elements are moused over
}
It would be great if InspectorUtilities.EndDrawPropertyTree(); updated the value of wantsMouseMove automatically, so that users don't have to remember to call it themselves in every custom inspector.