what do you mean you can't have a callback/delegate as a public variable on a blueprint class in unreal. that's silly!!
if anybody knows a solid accepted workaround for this i'd love to hear ty <3

──────────────────────────────
🌸 many-shaped creature
✨ too many projects
🚀 cannot be stopped
🌙 stayed up too late
eggbug enjoyer
──────────────────────────────
header image: chapter 8 complete from celeste
avatar: made using this character builder
what do you mean you can't have a callback/delegate as a public variable on a blueprint class in unreal. that's silly!!
if anybody knows a solid accepted workaround for this i'd love to hear ty <3
I think those are defined separately from variables, just below them, in the Event Dispatcher section of the blueprint editor:
https://docs.unrealengine.com/5.3/en-US/event-dispatchers-in-unreal-engine/#settingproperties
or do you mean in C++ code?
For C++ you can mark the delegate UPROPERTY as BlueprintAssignable to make it available. It also has to be a DYNAMIC delegate specifically (and maybe multicast only? Ive worked around the single cast version by making custom accessors / modifiers):
https://docs.unrealengine.com/5.3/en-US/multicast-delegates-in-unreal-engine/
so event dispatchers are what led me to make the post actually - i made one and hooked it all up so it would fire when a thing happened, and then i realized you couldn't assign anything to it from the hierarchy like you can with other blueprint variables. they seem to be private by definition, which feels strange to me because in my mind the whole purpose of a callback type structure is so unrelated objects can talk to each other
i'm basically looking for a field that i can drag a UObject into and pick a function on that UObject from a dropdown menu
Ah! Hmm... At best, you can add event hooks for the object that owns the current hierarchy - cant assign a different object to be the handler or pick a preexisting function (without a custom editor). So instead you'd have the hierarchy owner bind a new event and forward the call
There's a way to get the events to show in the bottom of the inspector in the hierarchy view (in an Events section). I can hop on UE rq and see what it needs if they're not showing by default o.O
This page makes it sound like they should be available by default tho: (I dont think they're only UMG? could be wrong)
https://docs.unrealengine.com/5.2/en-US/umg-events-in-unreal-engine/
it feels like the intended workflow in this engine is to fire off events from the input end and consume them from the output end, without any specific link between those objects. do i have that right?
and if you want to target the event to just a single consumer... i guess you include an id or something?
like, the part that's confusing me is that this is a really basic thing to want a game engine to do (i step on this button -> that door opens), so UE must have an idiomatic way to do it, i just can't figure out what it is...
(thank you for your help by the way! sorry if i sound frustrated, i am with the engine but not with you 💜)