In UE 4.21, The current functionality that exists for DECLARE_EVENT Broadcast() does not function as the docs describe:
"Events are very similar to multi-cast delegates . However, while any class can bind events, only the class that declares the event may invoke the event's Broadcast, IsBound, and Clear functions."
However, it can be called outside of it's containing class. Users have reported that this behavior has existed since the implementation of the following CL: CL 2672383
I've included a sample project of this behavior.
Expected: Build should fail due to the class not declaring the event.
Result: Build Succeeds.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-67922 in the post.
|Component||UE - Foundation - Core|
|Affects Versions||4.19, 4.20, 4.21, 4.22|
|Created||Jan 2, 2019|
|Resolved||Aug 27, 2021|
|Updated||Aug 27, 2021|