- Home /
Question by
NeonTheCoder · Jul 19, 2018 at 11:39 PM ·
unityeditorreflectionpropertyfield
Get a list of methodInfo/fieldInfo from a GameObject/Monobehavior like UnityEvent Field?
I'm trying to recreate the UnityEvent propertyfield but I am having a hard time getting a proper list of methods/fields
I've tried using bindingflags to get just to get public variables but any less than this will result in an empty list var publicFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.Default;
With this I get about 50 methods that are mostly useless and not the ones that the Monobehavior/GameObject usually show in a unity event field.
The reason why I need to recreate it instead of use it is because I want to get an input from the editor and use it as the object in UnityEvent, but do to most values in unityevent being private/getonly I can't really make a new unityaction and modify it on the fly in editor.
Comment