Skip to content

Commit f8063d1

Browse files
committed
Added UnityEvent node example
1 parent e7ac55d commit f8063d1

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using GraphProcessor;
5+
using System.Linq;
6+
using UnityEngine.Events;
7+
8+
[System.Serializable, NodeMenuItem("Custom/Unity Event Node")]
9+
public class UnityEventNode : BaseNode
10+
{
11+
[Input(name = "In")]
12+
public float input;
13+
14+
[Output(name = "Out")]
15+
public float output;
16+
17+
public UnityEvent evt;
18+
19+
public override string name => "Unity Event Node";
20+
21+
protected override void Process()
22+
{
23+
output = input * 42;
24+
}
25+
}

Assets/Examples/DefaultNodes/Nodes/UnityEventNode.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)