浏览代码

Update following the RFC

/main
Patrick Fournier 7 年前
当前提交
f1bea6cf
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 13
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs

13
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs


Insert(0, new GridBackground());
AddStyleSheetPath("Styles/MaterialGraph");
serializeCopyPasteData = SerializeCopyPasteDataImplementation;
canPasteSerializedData = CanPasteSerializedDataImplementation;
unserializeAndPaste = UnserializeAndPasteImplementation;
deleteSelection = DeleteSelectionImplementation;
}
public bool CanAddToNodeMenu(Type type)

PropagateSelection();
}
protected override string SerializeCopyPasteData(IEnumerable<GraphElement> elements)
string SerializeCopyPasteDataImplementation(IEnumerable<GraphElement> elements)
protected override bool CanPasteSerializedData(string serializedData)
bool CanPasteSerializedDataImplementation(string serializedData)
protected override void UnserializeAndPasteOperation(string operationName, string serializedData)
void UnserializeAndPasteImplementation(string operationName, string serializedData)
{
var mgp = GetPresenter<MaterialGraphPresenter>();
mgp.graph.owner.RegisterCompleteObjectUndo(operationName);

protected override void DeleteSelectionOperation(string operationName)
void DeleteSelectionImplementation(string operationName, GraphView.AskUser askUser)
{
var mgp = GetPresenter<MaterialGraphPresenter>();
mgp.graph.owner.RegisterCompleteObjectUndo(operationName);

正在加载...
取消
保存