Announcement

Collapse
No announcement yet.

Possible to check if Event Dispatcher has events bound?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Possible to check if Event Dispatcher has events bound?

    Pretty much what the title of the topic says. Let's say I have an event dispatcher named "PerformAction", is there a way for me in blueprint to check if there are events bound to PerformAction and return this as a boolean? Alternatively return the number of events bound to is (in which case I can get the boolean myself from a more-than-zero check)? As a bonus, is there some way to get the list of events bound to it?

    #2
    I don't think there is a way to do this. That probably doesn't even work in C++.

    Comment


      #3
      Originally posted by SenseiHaketon View Post
      I don't think there is a way to do this. That probably doesn't even work in C++.
      Sure you can, EventDelegates have multiple useful functions for these things (not in BP though).

      http://api.unrealengine.com/INT/API/...criptDelegate/

      You can check IsBound() for if it is bound at all, get a list of the bound objects (can obtain a count from that) and check if it already Contains() your function delegate.


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        #4
        Originally posted by mordentral View Post

        Sure you can, EventDelegates have multiple useful functions for these things (not in BP though).

        http://api.unrealengine.com/INT/API/...criptDelegate/

        You can check IsBound() for if it is bound at all, get a list of the bound objects (can obtain a count from that) and check if it already Contains() your function delegate.
        Nice, learned something new!

        Comment


          #5
          Yeah nice to check some threads just for the sake of learning new things.
          Nilson Lima
          Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
          Join us at Discord: https://discord.gg/uFFSEXY

          UE4 Marketplace: Cloudscape Seasons
          supporting: Community FREE Ocean plugin

          Comment


            #6
            Thanks for the replies. Shame it isn't possible to access from blueprints, but at least I learned something new and know that if I transition to C++ I have those options available.

            Comment

            Working...
            X