0
Researching

Getting parameters from a Unity Event

Limpertus 3 weeks ago • updated 2 weeks ago 3

Hi, 

I'm new to Bolt and couldn't find an answer to my question here. 

As you can see in my screenshot, I want to access the parameters that are passed via the Unity Event. How can I do this in Bolt?

Hope you have a time to answer my question. 

Thanks and have a great day,

André

Bolt Version:
Unity Version:
.NET Version:
+1

i don't think this works, I agree it should. 

I helped someone else out to make a custom event receive any type of unity event. All you do is place the attached component on the same object as the unity event. Aka... the button, scrollview ect. Not the graph. 

Use a custom event instead of unity event in the graph. Set the same name and Target on this component to the same one in the graph. Then set your custom event to have same amount of output arguments as the event is supposed to send through

.







 

BoltCustomUnityEvent.cs

hope this helps, let me know if you have any questions.


+2
Researching

Interesting, I had no idea Unity would support using object arguments as handlers for UnityEvents. I could give this another look to make it easier / built-in.

+1

Thank you both for your replies and time :)