浏览代码

Small Fix + Moved button to be visible at all times.

/main
Thomas ICHÉ 5 年前
当前提交
9ef5efd4
共有 1 个文件被更改,包括 8 次插入9 次删除
  1. 17
      Editor/Discover/DiscoverEditor.cs

17
Editor/Discover/DiscoverEditor.cs


{
using (new GUILayout.HorizontalScope())
{
GUILayout.FlexibleSpace();
editing = GUILayout.Toggle(editing, "Edit", EditorStyles.miniButton, GUILayout.Width(48));
}
if (editing)
{
if(GUILayout.Button("Align Discover to View"))
if (GUILayout.Button("Align Discover to View"))
var transform = (serializedObject.targetObject as GameObject).transform;
var transform = (serializedObject.targetObject as Discover).gameObject.transform;
var svTransform = SceneView.lastActiveSceneView.camera.transform;
transform.position = svTransform.position;

DrawDefaultInspector();
GUILayout.FlexibleSpace();
editing = GUILayout.Toggle(editing, "Edit", EditorStyles.miniButton, GUILayout.Width(48));
if (editing)
DrawDefaultInspector();
else
DrawDiscoverContentGUI(m_Discover);
}

正在加载...
取消
保存