浏览代码

Added Align to view Button in discover Component Inspector

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

11
Editor/Discover/DiscoverEditor.cs


}
if (editing)
{
if(GUILayout.Button("Align Discover to View"))
{
var transform = (serializedObject.targetObject as GameObject).transform;
var svTransform = SceneView.lastActiveSceneView.camera.transform;
transform.position = svTransform.position;
transform.rotation = svTransform.rotation;
transform.localScale = Vector3.one;
}
}
else
DrawDiscoverContentGUI(m_Discover);
}

正在加载...
取消
保存