I have a blueprint that needs to influence other blueprints. I’m trying to aim for as tidy of code as I can.
So I need to cast to a blueprint but I might not know which one, so these possible objects are stored in an array. However whenever I want to Cast to I always only have a premade choice rathen than being able to plug into whichever object I want to.
Something like this. Is there no way around this? If I have 50 odd enemy blueprint types I have to manually hard code each cast to with a ton of branches? There’s gotta be a more elegant way of doing this…
Then maybe have them implement an interface with a function called “update values” and just call that function without casting? The class of the actor won’t matter as long as it implements the interface function. It’s also more performant.