浏览代码

Fix for prompting dirty shader graph

Wen  a shader graph is dirty it will now tell you the name of it.
/main
martint-unity 6 年前
当前提交
0d207da9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs

3
com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs


{
if (graphObject != null)
{
if (graphObject.isDirty && EditorUtility.DisplayDialog("Shader Graph Has Been Modified", "Do you want to save the changes you made in the shader graph?\n\nYour changes will be lost if you don't save them.", "Save", "Don't Save"))
string nameOfFile = AssetDatabase.GUIDToAssetPath(selectedGuid);
if (graphObject.isDirty && EditorUtility.DisplayDialog("Shader Graph Has Been Modified", "Do you want to save the changes you made in the shader graph?\n" + nameOfFile + "\nYour changes will be lost if you don't save them.", "Save", "Don't Save"))
UpdateAsset();
Undo.ClearUndo(graphObject);
DestroyImmediate(graphObject);

正在加载...
取消
保存