- Home /
?EditorGUIUtility.ShowObjectPicker filter by FOLDER?
?Does anyone know if there is a way to make a filter by folder when calling EditorGUIUtility.ShowObjectPicker?
Answer by HarshadK · Feb 10, 2017 at 01:16 PM
I don't think the string based search filter allows for folders to be passed as parameters. It is one of the reasons why AssetDatabase.FindAssets method has a special parameter of type string array to pass in folders in which to search. The SearchFilter
class in unity does have a public string[] folders
property which allows you to set the folders to search in with this SearchFilter
instance. This property is set by the AssetDatabase.FindAssets
method in its implementation. But the ObjectSelector
class which is used by the EditorGUIUtility.ShowObjectPicker
only supports the string based search filters at the moment.
Your answer
Follow this Question
Related Questions
Custom Inspector Color Spacer 1 Answer
Track when the value is changed and get it 0 Answers
Customizing Editor Interface 1 Answer