浏览代码

Make added nodes appear under mouse cursor

Signed-off-by: joce <joce@unity3d.com>
/main
joce 8 年前
当前提交
e895baa6
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphView.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphView.cs


if (node == null)
return;
var drawstate = node.drawState;
drawstate.position = new Rect(posObj.m_Pos.x, posObj.m_Pos.y, 0, 0);
Vector3 localPos = contentViewContainer.transform.inverse.MultiplyPoint3x4(posObj.m_Pos);
drawstate.position = new Rect(localPos.x, localPos.y, 0, 0);
node.drawState = drawstate;
var graphDataSource = GetPresenter<AbstractGraphDataSource>();

正在加载...
取消
保存