浏览代码

Quick fix for graphs not saving, needs more investigation.

/main
Tim Cooper 8 年前
当前提交
151572ca
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 9
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/AbstractGraphDataSource.cs

9
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/AbstractGraphDataSource.cs


foreach (var drawableNodeData in found)
drawableNodeData.MarkDirtyHack();
}
EditorUtility.SetDirty(graphAsset.GetScriptableObject());
}
private void UpdateData()

public void AddNode(INode node)
{
graphAsset.graph.AddNode(node);
EditorUtility.SetDirty(graphAsset.GetScriptableObject());
UpdateData();
}

graphAsset.graph.ValidateGraph();
EditorUtility.SetDirty(graphAsset.GetScriptableObject());
UpdateData();
}

public void AddElement(GraphElementData element)
{
var edge = element as EdgeData;
if (edge.candidate == false)
if (edge != null && edge.candidate == false)
{
EditorUtility.SetDirty(graphAsset.GetScriptableObject());
}
UpdateData();
return;
}

正在加载...
取消
保存