浏览代码

Fix serialization

/main
Peter Bay Bastian 7 年前
当前提交
a8f898e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/AbstractMaterialGraphEditWindow.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/AbstractMaterialGraphEditWindow.cs


if (graph == null)
return;
File.WriteAllText(path, EditorJsonUtility.ToJson(graphObject, true));
File.WriteAllText(path, EditorJsonUtility.ToJson(graph, true));
AssetDatabase.ImportAsset(path);
}

textures.Add(texture);
}
shaderImporter.SetNonModifiableTextures(textureNames.ToArray(), textures.ToArray());
File.WriteAllText(path, EditorJsonUtility.ToJson(graphObject, true));
File.WriteAllText(path, EditorJsonUtility.ToJson(graph, true));
shaderImporter.SaveAndReimport();
AssetDatabase.ImportAsset(path);
}

正在加载...
取消
保存