Custom Event Definitions

Lazlo Bonin (Lead Developer) 12 months ago • updated by genbod 2 months ago 8 1 duplicate

To make custom events less error-prone and better documented, we could introduce the concept of custom event definitions. These would:

  • Be saved as an asset
  • Have a name and description
  • Have a strongly typed list of arguments, like value input/outputs in flow graphs
  • Show up in the fuzzy finder under an Events/Custom subcategory
  • Have two nodes per definition, one for triggering and one for listening

The existing Custom Event node should remain for backwards compatibility, but maybe be renamed to something like "Lambda Event" or "Variadic Event".

Inspired by the discussion here: http://support.ludiq.io/topics/248-macros-vs-methods/#

Duplicates 1


Additionally, adding a dropdown choice between "Global" and "Instance" could be interesting.

Global events would work like the current custom events, i.e. be triggered on every object that is listening.

Instance events would require an additional game object target input when triggering, and would only trigger on the machines of that object.

that'a a great idea!

a possible idea for events:

I kept forgetting what my events were called so I added them to the app variables and then called them like this, this way I always knew what events are available and what they are called

wondered if it would be a good idea to have a specific Events tab in the variables. Anything added to this list could then populate a drop down in the Custom Events (like the variable drop down). In this example the drop down would show ON_DATA_LOADED ON_SPLASH_SCREEN etc. This would help track the events and ensure that you were not using duplicate names.

Also means you don't make stupid spelling mistakes that stop an even firing as the variable could also be used in a drop down on the event listener

Just an idea ;)


D'oh just noticed the drop down on the Get Variable. Kinda already doing what I wanted. 

I just saw this article on using ScriptableObjects for an event system: https://unity3d.com/how-to/architect-with-scriptable-objects. I am looking to use ScriptableObjects more in my architecture and would love to be able to use them more in Bolt.