2
0

DefaultShaderIncludes.cs 458 B

123456789101112131415
  1. using System.IO;
  2. using System.Linq;
  3. using UnityEngine;
  4. namespace UnityEditor
  5. {
  6. internal static class DefaultShaderIncludes
  7. {
  8. public static string GetAssetsPackagePath()
  9. {
  10. var packageDirectories = Directory.GetDirectories(Application.dataPath, "com.unity.shadergraph", SearchOption.AllDirectories);
  11. return packageDirectories.Length == 0 ? null : Path.GetFullPath(packageDirectories.First());
  12. }
  13. }
  14. }