Feature Proposal
Add optional parameter to string fields that allow using the additional button for file selection.
Problem this Solves
For example in BuildPlayerStep there is AssetBundleManifest Path, with the button we would be able to select a specific file instead of copying path from the explorer
Working example in attached video (but i don't like how i made it)
public class StringDrawer : FieldDrawer<string>
{
/// <inheritdoc />
protected override string OnRender(GUIContent content, string value, FormulaCollection formulaCollection)
{
value = EditorGUILayout.TextField(content, value);
if (content.text.ToLower().Contains("path"))
{
if (GUILayout.Button("Select path"))
{
value = EditorUtility.OpenFilePanel(value, "", "");
}
}
return value;
}
Feature Proposal Add optional parameter to string fields that allow using the additional button for file selection.
Problem this Solves For example in BuildPlayerStep there is AssetBundleManifest Path, with the button we would be able to select a specific file instead of copying path from the explorer
Working example in attached video (but i don't like how i made it)
https://user-images.githubusercontent.com/1843494/123984716-26f04f80-d9c5-11eb-84c4-0a04e19c8a31.mp4