A game about forced loneliness, made by TACStudios
1using System; 2using System.Collections.Generic; 3using UnityEditor.ShaderGraph; 4 5namespace UnityEditor.Graphing 6{ 7 enum ModificationScope 8 { 9 Nothing = 0, 10 Node = 1, 11 Graph = 2, 12 Topological = 3, 13 Layout = 4 14 } 15 16 delegate void OnNodeModified(AbstractMaterialNode node, ModificationScope scope); 17 18 static class NodeExtensions 19 { 20 public static IEnumerable<T> GetSlots<T>(this AbstractMaterialNode node) where T : MaterialSlot 21 { 22 var slots = new List<T>(); 23 node.GetSlots(slots); 24 return slots; 25 } 26 27 public static IEnumerable<T> GetInputSlots<T>(this AbstractMaterialNode node) where T : MaterialSlot 28 { 29 var slots = new List<T>(); 30 node.GetInputSlots(slots); 31 return slots; 32 } 33 34 public static IEnumerable<T> GetInputSlots<T>(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot 35 { 36 var slots = new List<T>(); 37 node.GetInputSlots(startingSlot, slots); 38 return slots; 39 } 40 41 public static IEnumerable<T> GetOutputSlots<T>(this AbstractMaterialNode node) where T : MaterialSlot 42 { 43 var slots = new List<T>(); 44 node.GetOutputSlots(slots); 45 return slots; 46 } 47 48 public static IEnumerable<T> GetOutputSlots<T>(this AbstractMaterialNode node, MaterialSlot startingSlot) where T : MaterialSlot 49 { 50 var slots = new List<T>(); 51 node.GetOutputSlots(startingSlot, slots); 52 return slots; 53 } 54 } 55}