A game about forced loneliness, made by TACStudios
at master 31 lines 694 B view raw
1using System.Reflection; 2 3namespace UnityEditor.ShaderGraph 4{ 5 [Title("Math", "Advanced", "Length")] 6 class LengthNode : CodeFunctionNode 7 { 8 public LengthNode() 9 { 10 name = "Length"; 11 synonyms = new string[] { "measure" }; 12 } 13 14 protected override MethodInfo GetFunctionToConvert() 15 { 16 return GetType().GetMethod("Unity_Length", BindingFlags.Static | BindingFlags.NonPublic); 17 } 18 19 static string Unity_Length( 20 [Slot(0, Binding.None)] DynamicDimensionVector In, 21 [Slot(1, Binding.None)] out Vector1 Out) 22 { 23 return 24@" 25{ 26 Out = length(In); 27} 28"; 29 } 30 } 31}