浏览代码

Removed old interface that wasn't used anymore, IDropTarget

/main
Martin Thorzen 7 年前
当前提交
aa3df588
共有 1 个文件被更改,包括 2 次插入40 次删除
  1. 42
      com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs

42
com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs


namespace UnityEditor.ShaderGraph.Drawing
{
public sealed class MaterialGraphView : GraphView, IDropTarget
public sealed class MaterialGraphView : GraphView
{
public MaterialGraphView()
{

selection.Clear();
}
public bool CanAcceptDrop(List<ISelectable> selection)
{
return selection.OfType<BlackboardField>().Any();
}
#if UNITY_2018_1
public EventPropagation DragUpdated(IMGUIEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
return EventPropagation.Continue;
}
public EventPropagation DragPerform(IMGUIEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
return EventPropagation.Continue;
}
public EventPropagation DragExited()
{
return EventPropagation.Continue;
}
#else
public bool DragUpdated(DragUpdatedEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
return true;
}
public bool DragPerform(DragPerformEvent evt, IEnumerable<ISelectable> selection, IDropTarget dropTarget)
{
return true;
}
bool IDropTarget.DragExited()
{
return true;
}
#endif
}
public static class GraphViewExtensions

var remappedNodes = remappedNodesDisposable.value;
var remappedEdges = remappedEdgesDisposable.value;
graphView.graph.PasteGraph(copyGraph, remappedNodes, remappedEdges);
if (graphView.graph.guid != copyGraph.sourceGraphGuid)
{
// Compute the mean of the copied nodes.

正在加载...
取消
保存