Download

4.6 Casting - new functionality.

Just a heads-up as it took me a while to figure this one out - if you try to cast to a class and can’t access its variables anymore it’s likely due to the variables now having to be set to ‘public’. Your casts should now behave like normal again.

I don’t think the connections already made (pre 4.6 if you’re converting a project) to non-public variables will stop functioning in any way but maybe someone else can answer that.

That’s all.

I can confirm that existing connections remain (and work as intended!) but you cannot recreate them, or create new ones, without making the variables in question public.

Great, thanks for the input.

Was just about to make this thread so thanks. Just wondering what the intended purpose of this change is? because stuff could get quite messy having to make lots of variables public in order for them to be edited via casting. Should we be using BP interfaces to communicate between BP’s instead of casting?

I was wondering the same thing PhoTek. Seems like a strange decision.

To be honest I have always made the variables that I wanted to be acessible in other blueprints public.
It just made sense to me and I was surprised to hear that casting used to work on variables that aren’t public. :stuck_out_tongue:

It goes both ways. True, it probably clutters up your editor when spawning instances of a BP on the map, but it also makes the casting menu far less cluttered (I have 150+ variables for my Character BP, trying to find one in the context menu from a cast is pretty nightmarish if I can’t remember whether I called a variable, for instance, “Dashing” or “In Dash” or “Is Dash” or “AttemptingDash” or whatever.)

I actually had the same thought when I started with Unreal, don’t mind the change but would’ve appreciated this change to have been made known in the update. I don’t think I missed any notes on it but I guess I could’ve…

Thanks for the tips.
I was wondering where was my problem :wink:

But it make sens that we have to set the variables public to share them …

But the checkbox private is useless now … What do you think about it ?