浏览代码

Removing this, since it has been added into another PR

/main
Martin Thorzen 6 年前
当前提交
67f8b052
共有 3 个文件被更改,包括 5 次插入7 次删除
  1. 9
      com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
  2. 2
      com.unity.shadergraph/Editor/Importers/ShaderGraphAssetPostProcessor.cs
  3. 1
      com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs

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


return;
var path = AssetDatabase.GetAssetPath(asset);
// Remove the "." in ".extension_name"
var extension = Path.GetExtension(path).Substring(1);
var extension = Path.GetExtension(path);
switch (extension.ToLower())
switch (extension)
case ShaderGraphImporter.ShaderGraphExtension:
case ".ShaderGraph":
case ShaderSubGraphImporter.ShaderSubGraphExtension:
case ".ShaderSubGraph":
graphType = typeof(SubGraph);
break;
default:

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


RegisterShaders(importedAssets);
bool anyShaders = movedAssets.Any(val => val.EndsWith(ShaderGraphImporter.ShaderGraphExtension, StringComparison.InvariantCultureIgnoreCase));
anyShaders |= movedAssets.Any(val => val.EndsWith(ShaderSubGraphImporter.ShaderSubGraphExtension, StringComparison.InvariantCultureIgnoreCase));
anyShaders |= movedAssets.Any(val => val.EndsWith("shadersubgraph", StringComparison.InvariantCultureIgnoreCase));
if (anyShaders)
UpdateAfterAssetChange(movedAssets);
}

1
com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs


[ScriptedImporter(2, "ShaderSubGraph")]
public class ShaderSubGraphImporter : ScriptedImporter
{
public const string ShaderSubGraphExtension = "shadersubgraph";
public override void OnImportAsset(AssetImportContext ctx)
{
var textGraph = File.ReadAllText(ctx.assetPath, Encoding.UTF8);

正在加载...
取消
保存