UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class PLUGIN_API UMyClass: public UActorComponent
{
GENERATED_BODY()
// use dynamic multicast, more option here
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnCustomDispatch);
public:
UPROPERTY(BlueprintAssignable)
FOnCustomDispatch OnCustomDispatch ;
}
[...]
OnCustomDispatch.Broadcast();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Switch Variables")
float DesiredIntensity;
more info : https://docs.unrealengine.com/en-US/Gameplay/ClassCreation/CodeAndBlueprints/index.html