IMayRequireTime.cs 378 B

123456789101112131415161718
  1. using UnityEditor.Graphing;
  2. namespace UnityEditor.ShaderGraph
  3. {
  4. interface IMayRequireTime
  5. {
  6. bool RequiresTime();
  7. }
  8. static class MayRequireTimeExtensions
  9. {
  10. public static bool RequiresTime(this AbstractMaterialNode node)
  11. {
  12. return node is IMayRequireTime mayRequireTime && mayRequireTime.RequiresTime();
  13. }
  14. }
  15. }