A game about forced loneliness, made by TACStudios
1using System.Reflection;
2
3namespace UnityEditor.ShaderGraph
4{
5 [Title("Math", "Basic", "Add")]
6 class AddNode : CodeFunctionNode
7 {
8 public AddNode()
9 {
10 name = "Add";
11 synonyms = new string[] { "addition", "sum", "plus" };
12 }
13
14 protected override MethodInfo GetFunctionToConvert()
15 {
16 return GetType().GetMethod("Unity_Add", BindingFlags.Static | BindingFlags.NonPublic);
17 }
18
19 static string Unity_Add(
20 [Slot(0, Binding.None)] DynamicDimensionVector A,
21 [Slot(1, Binding.None)] DynamicDimensionVector B,
22 [Slot(2, Binding.None)] out DynamicDimensionVector Out)
23 {
24 return
25@"
26{
27 Out = A + B;
28}
29";
30 }
31 }
32}