IMayRequireVertexSkinning.cs 562 B

123456789101112131415161718
  1. using UnityEditor.Graphing;
  2. namespace UnityEditor.ShaderGraph
  3. {
  4. interface IMayRequireVertexSkinning
  5. {
  6. bool RequiresVertexSkinning(ShaderStageCapability stageCapability = ShaderStageCapability.All);
  7. }
  8. static class MayRequireVertexSkinningExtensions
  9. {
  10. public static bool RequiresVertexSkinning(this ISlot slot)
  11. {
  12. var mayRequireVertexSkinning = slot as IMayRequireVertexSkinning;
  13. return mayRequireVertexSkinning != null && mayRequireVertexSkinning.RequiresVertexSkinning();
  14. }
  15. }
  16. }