Skip to content

Commit a6f6725

Browse files
committed
set subgraph window title correct
1 parent e674fe8 commit a6f6725

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Editor/ShaderGraphWindow.cs

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public void Initialize(string importerGuid, bool focus = true)
6666

6767
public string GetShaderDisplayName(GraphData data)
6868
{
69+
if (graphView.IsSubgraph)
70+
{
71+
return Path.GetFileNameWithoutExtension(AssetDatabase.GUIDToAssetPath(importerGuid));
72+
}
6973
if (string.IsNullOrEmpty(data.shaderName) || data.shaderName == "Default Shader")
7074
{
7175
return data.shaderName = "Graphlit/" + Path.GetFileNameWithoutExtension(AssetDatabase.GUIDToAssetPath(importerGuid));

Shaders/Subgraph.subgraphlit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"data": {
3-
"shaderName": "Graphlit/New Shader Graph",
3+
"shaderName": "",
44
"properties": [],
55
"precision": 0,
66
"defaultPreviewState": 1,

0 commit comments

Comments
 (0)