Firstborn/Library/PackageCache/com.unity.terrain-tools@4.0.3/Editor/TerrainTools/Compute/ComputeUtility.cs

14 lines
484 B
C#
Raw Normal View History

2023-03-28 13:24:16 -04:00
using UnityEditor;
using UnityEngine;
internal static class ComputeUtility
{
internal static ComputeShader GetShader(string name) {
var computeShader = AssetDatabase.LoadAssetAtPath<ComputeShader>("Packages/com.unity.terrain-tools/Editor/TerrainTools/Compute/" + name + ".compute");
if (computeShader == null) {
throw new MissingReferenceException("Could not find compute shader with name " + name);
}
return computeShader;
}
}