- Home /
How to preset a filter on ObjectField's GameObject Selection box
In the custom inspector widget I am coding up how would one preset a filter on the EditorGUILayout.ObjectField's "Select GameObject" search edit box when the user clicks the select object button to the right of the widget. I have some labels that I have applied to some prefabs in my project view and would like to only show those. I can do this manually, but I'm trying to add as much automation as possible to the authoring of my game. Currently I am getting the set of all GameObjects. I know I show objects based on the type of object it is but that seems limiting considering prefabs.
The new Navigation Mesh view seems to have a method by which it is targeting the Hierarchy View's search box and applying a filter to that. I would like to do something similar to that.
Thanks ahead of time!
Your answer

Follow this Question
Related Questions
Possible to remove the Asset Browser button from an Objectfield? 0 Answers
CustomEditor : DrawDefaultInspector for Class 1 Answer
EditorGUILayout.ObjectField cannot be changed. 1 Answer
Inspector Titlebar for class derived from Object 1 Answer
How do I change inspector values of other game objects using a custom Editor Window 0 Answers