And noticed that in my latest version of NC, I do not have the option to select the script. I have a custom script on my game object, and when I add the “Check C Sharp Event” action to a node, the only thing that appears is a “Select Event” button. If I click this, every option is grayed out.
My goal is to be able to call either an EventHandler(not sure if this is possible in NC right now) or an Action on my custom script. Am I doing something wrong? Thanks.
The CheckCSharp Event condition, is able to only subscribe to events of System.Action type.
Here is an example of an event that can be used from CheckCSharp Event condition.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
publicclassExample:MonoBehaviour{
publicevent System.Action onSomethingHappened;
voidUpdate(){
if(Input.GetKeyDown(KeyCode.Space)){
if(onSomethingHappened!=null){
onSomethingHappened();
}
}
}
}
Can you please confirm that if you attach this script on the same gameobject as the GraphOwner is attached on, will allow you to select “Example/onSomethingHappened” after clicking the “Select Event” button?