You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
484 B
C#
14 lines
484 B
C#
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;
|
|
}
|
|
}
|