浏览代码

Update `CoreShaderIncludePaths` to use `SRPMARKER`

/main
Peter Bay Bastian 7 年前
当前提交
c3ce7007
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 14
      ScriptableRenderPipeline/Core/Editor/CoreShaderIncludePaths.cs

14
ScriptableRenderPipeline/Core/Editor/CoreShaderIncludePaths.cs


[ShaderIncludePath]
public static string[] GetPaths()
{
return new[]
var srpMarker = Directory.GetFiles(Application.dataPath, "SRPMARKER", SearchOption.AllDirectories).FirstOrDefault();
var paths = new string[srpMarker == null ? 1 : 2];
var index = 0;
if (srpMarker != null)
"Assets/ScriptableRenderPipeline/ScriptableRenderPipeline/Core",
Path.GetFullPath("Packages/com.unity.render-pipelines.core")
};
var rootPath = Directory.GetParent(srpMarker).ToString();
paths[index] = Path.Combine(rootPath, "ScriptableRenderPipeline/Core");
index++;
}
paths[index] = Path.GetFullPath("Packages/com.unity.render-pipelines.core");
return paths;
}
}
}
正在加载...
取消
保存