"CAST" FOR BIND DISPATCHER

Echo
Wed, 30 Apr 2025 06:40:53 +0000
Blueprint

Hello ev!

I made a bp that takes all the most used bp’s refs in my project, to avoid having too many get actors of class x times in each of them, to keep everything lighter. So, this bp takes all the refs and transmit them via Blueprint Interface. Now the problems is when I must use refs on binds, because a bind needs a strong,persistent and specific reference while I write refs in run time as variables, and this is a problem, infact the variable results not compatible on bind even if it’s the same bp obj ref where the call dispatcher is done. Actually I “solved” itering each ref with “cast to” and in case the cast is not failed and “as bp i need” is valid, I set “as bp” as the variable for the bind. This solved both the incompatibility issue and all the error messages I had in the log regarding K2node.

Up until now I’ve worked to avoid CASTs like hell, in this case I found myself forced.

So, now my questions are : Is wrong to use CAST node in this way? And also, Is there a better way to solve this kind of issue?

Thank y’all so much!

24 posts - 3 participants