浏览代码

Find and Replace : Result list enables selecting / focusing on objects

/main
Thomas ICHÉ 5 年前
当前提交
cd99286e
共有 2 个文件被更改,包括 23 次插入4 次删除
  1. 1
      CHANGELOG.md
  2. 26
      Editor/FindAndReplace/FindAndReplaceWindow.cs

1
CHANGELOG.md


- Discover : Tag Filtering System
- Discover : Images in Discover Window
- Find and Replace : Result list enables selecting / focusing on objects
## 2019.3.4

26
Editor/FindAndReplace/FindAndReplaceWindow.cs


foreach(var obj in searchResults)
{
using (new GUILayout.HorizontalScope(EditorStyles.textField))
using (new GUILayout.HorizontalScope(EditorStyles.toolbarButton))
GUILayout.Label(obj.name, EditorStyles.label);
if(GUILayout.Button("X", GUILayout.Width(32)))
if(GUILayout.Button(obj.name, EditorStyles.label))
{
Selection.activeGameObject = obj;
}
if(GUILayout.Button("Focus", Styles.miniButton, GUILayout.Width(48)))
{
Selection.activeObject = obj;
SceneView.lastActiveSceneView.FrameSelected();
}
if(GUILayout.Button("X", Styles.miniButton, GUILayout.Width(32)))
{
toRemove = obj;
}

{
public static readonly GUIStyle boldLabel = GetBoldLabel();
public static readonly GUIStyle bigButton = GetBigButton();
public static readonly GUIStyle miniButton = GetMiniButton();
return style;
}
static GUIStyle GetMiniButton()
{
var style = new GUIStyle(EditorStyles.miniButton);
style.fontSize = 12;
style.margin = new RectOffset(0, 0, -1, 0);
return style;
}

正在加载...
取消
保存