示例#1
0
 void Draw(Object current, GUIContent gui, OnAssetsLoaded onAssetsLoaded, Func <List <Object>, List <Object> > onAssetsFound, Action <Object> onPicked)
 {
     EditorGUILayout.BeginHorizontal();
     DrawLabel(gui);
     if (GUITools.Button(GetGUI(current), GUITools.popup))
     {
         BuildMenu(current, onAssetsLoaded, onAssetsFound, onPicked, (e) => e.asset);
     }
     if (GUITools.IconButton(pingGUI))
     {
         EditorGUIUtility.PingObject(current);
     }
     EditorGUILayout.EndHorizontal();
 }
示例#2
0
 void DrawName(string current, GUIContent gui, OnAssetsLoaded onAssetsLoaded, Func <List <Object>, List <Object> > onAssetsFound, Action <string> onPicked)
 {
     EditorGUILayout.BeginHorizontal();
     DrawLabel(gui);
     if (GUITools.Button(GetGUI(current), GUITools.popup))
     {
         BuildMenu(current, onAssetsLoaded, onAssetsFound, onPicked, (e) => e.assetName);
     }
     if (GUITools.IconButton(pingGUI))
     {
         PingAssetWithName(current, onAssetsLoaded, onAssetsFound);
     }
     EditorGUILayout.EndHorizontal();
 }
示例#3
0
 bool DrawButton(float x, Rect pos, GUIContent gui)
 {
     return(GUITools.Button(x, pos.y, pos.width - ((x - pos.x) + GUITools.iconButtonWidth), GUITools.singleLineHeight, gui, GUITools.popup));
 }