浏览代码

Fixed a small issue where the path was the name. We only want the last name of the shader and not the path to it.

/main
Martin Thorzen 6 年前
当前提交
b283a847
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 2
      com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
  2. 4
      com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs
  3. 2
      com.unity.shadergraph/Editor/Importers/ShaderGraphAssetPostProcessor.cs

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


};
graphEditorView.RegisterCallback<GeometryChangedEvent>(OnGeometryChanged);
titleContent = new GUIContent(asset.name);
titleContent = new GUIContent(asset.name.Split('/').Last());
Repaint();
}

4
com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs


get { return m_BlackboardProvider.blackboard.title; }
set
{
m_BlackboardProvider.blackboard.title = value;
m_MasterPreviewView.assetName = value;
m_BlackboardProvider.blackboard.title = value.Split('/').Last();
m_MasterPreviewView.assetName = value.Split('/').Last();
}
}

2
com.unity.shadergraph/Editor/Importers/ShaderGraphAssetPostProcessor.cs


for (int i = 0; i < newNames.Length; ++i)
{
if (matGraphEditWindow.selectedGuid == AssetDatabase.AssetPathToGUID(newNames[i]))
matGraphEditWindow.assetName = Path.GetFileNameWithoutExtension(newNames[i]);
matGraphEditWindow.assetName = Path.GetFileNameWithoutExtension(newNames[i]).Split('/').Last();
}
}
}

正在加载...
取消
保存