Casting Failed?


In the above code, when I left click my first print string works but after that it stops working. The reason for this is my cast is getting failed. So any idea where does the issue lies and it makes the cast fail.

The reason for this is my cast is getting failed.

How do you know the cast fails? Did you Print String off the Cast Failed pin? How are you testing it?

Yes, I printed out the cast getting failed node.

So what else is being done where we cannot see? What you’ve shown should work as is.

Are you saying that you can get both to print:

I call shenanigans.


The reason for this is my cast is getting failed. So any idea where does the issue lies and it makes the cast fail.

This makes no sense. Even if the cast failed, the first print string in your pic would still fire. One way to prevent it from firing is to spawn an actor, enable input and consume it before the LB can process it.


If the cast fails, you’ve never assigned the custom game instance to be your instance.

Yeah wherever I try to cast the game instance, cast is getting failed.

My first print string before the casting is working completely fine BTW I’m using ue4. 27

You’ve never assigned it. This has nothing to do with the pic you posted.

Check up here.

1 Like

Thanks Dude. I forgot about it totally. It’s working now.

1 Like