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
for this we need a generic default property renderer, as calling EditorGUI.PropertyField() results in a stack overflow (!). Could make it available to all.
I have implemented a CustomLaber property drawer recently using this helper function:
voidDrawDefaultProperty(Rectposition,SerializedPropertyproperty,GUIContentlabel,boolincludeChildren=true){//Horrible hack because just doing EditorGUI.PropertyField crashesDictionary<string,PropertyDrawer>s_dictionary=typeof(PropertyDrawer).GetField("s_PropertyDrawers",BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic).GetValue(null)asDictionary<string,PropertyDrawer>;foreach(varentryins_dictionary){if(entry.Value==this){s_dictionary[entry.Key]=null;EditorGUI.PropertyField(position,property,label,true);s_dictionary[entry.Key]=this;return;}}EditorGUI.PropertyField(position,property,label,true);
Based on a workaround I found online. I would submit a patch but this is a really hideous thing.
Override the default label (maybe every drawer should provide this?):
Maybe a secondary option that just adds a tooltip?
The text was updated successfully, but these errors were encountered: