IMayRequireMeshUV.cs 572 B

12345678910111213141516171819
  1. using UnityEditor.Graphing;
  2. using UnityEditor.ShaderGraph.Internal;
  3. namespace UnityEditor.ShaderGraph
  4. {
  5. interface IMayRequireMeshUV
  6. {
  7. bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability = ShaderStageCapability.All);
  8. }
  9. static class MayRequireMeshUVExtensions
  10. {
  11. public static bool RequiresMeshUV(this ISlot slot, UVChannel channel)
  12. {
  13. var mayRequireMeshUV = slot as IMayRequireMeshUV;
  14. return mayRequireMeshUV != null && mayRequireMeshUV.RequiresMeshUV(channel);
  15. }
  16. }
  17. }