Closed JingFengJi closed 4 years ago
Will download 2019 now and test, but topmostRect is already searched using Public | NonPublic which should include both.
Ok in the latest version it works fine, and the changes you propose are already there (+backwards compability), so you might be using an older version I assume?
I haven't tested it with another version, just in Unity2019.1.2f1, I tested other versions.
I still have this problem on Unity2019.1.12f1. I have not installed the updated version locally. Do you need me to help with more tests?
But are you using the latest version of the Framework from the develop branch? These are the most current lines from the develop branch and they should work just fine on your system if the lines your provide work:
PropertyInfo topmostRect = GUIClipType.GetProperty ("topmostRect", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); // ERROR
MethodInfo GetTopmostRect = topmostRect != null? (topmostRect.GetGetMethod(false) ?? topmostRect.GetGetMethod(true)) : null;
topmostRectDelegate = (Func
And are you on Mac by any chance? The 'comability mode' was initially introduced because some Mac users had similar problems, but I've never been able to debug them properly It works fine on 2019.1.14f1 on Linux
Sorry, I am using the code of the master branch, I switch the branch.
No problem, it’s my negligence, sorry again, respected author
Ah ok, is there any reason for that? Made the develop branch the default, master hasn't been updated in ages now. I currently don't have enough time to keep it updated regularily with fixes. Cool, no problem, glad it works now!
I am trying to use Node_Editor in Unity2019.1.2f1, When I open the Node Editor, it always report a Null Error. I found that in the Init function in the GUIScaleUtility script, the topmostRect variable is empty, and its GetGetMethod returns null.
topmostRect is private in Unity 2019.1.2f1. it should be :
PropertyInfo topmostRect = GUIClipType.GetProperty ("topmostRect", BindingFlags.Static | BindingFlags.NonPublic);
topmostRectDelegate = (Func<Rect>)Delegate.CreateDelegate (typeof(Func<Rect>), topmostRect.GetGetMethod (true));