Input not working in Class blueprint.

Hi all,

I’m currently having an issue with my class blueprint not accepting input.

I’m trying to press a key and change the text value of a TextRenderActor, but no matter what I try, the input is never fired.

You can see from the screenshot, I’ve enabled Input for the player for the blueprint. As well as this, no other blueprints are ‘blocking input’ in their ‘defaults’ section.

Key input works totally fine in the level blueprint, so it’s specific to this class blueprint.

I can’t think what’s wrong, I’d really appreciate some assistance!

http://puu.sh/evedl/56720ab40e.jpg

Hi Beacon,

I have just tested(I have used version 4.6.1) this construstion that you have attached to topic, and it’s works fine.

Which version of engine use you? Did you use any Template as start point? What parent class you used to create your BP?

This information should help investigate your problem.

Best wishes,

Hi , thanks for the quick reply!

I’m using the ‘Rift First Person’ template as a base, created by ‘mitchemmc’ - here VR Game Template - XR Development - Epic Developer Community Forums

I’m using 4.6.1 of UE4, and the parent class is TextRenderActor.

Thanks!

Thanks for so fast reply!

I got you.

i’ll return here asap with any information about your question.

Best Regards,

Good morning Beacon,

I have tested it on Rift template and on class based on TextRenderActor. Scheme worked as intended.

I have achieved a behavior like you describe only by blocking input from another actor.

Are you sure that nothing can block it in your project? if so then we mising smth important but i can’t realize whtat excatly.

Best Regards,

Hi again ,

Thanks for the extensive help! I appreciate it.

As far as I can see, there are no blueprints blocking input at all. I checked the defaults tab of every blueprint in the blueprints folder, and none have ‘block input’ ticked. I cannot think what the problem is :confused:

Ok, so after more testing it seems like the input does actually work, but the animation to show the blueprint lines ‘firing’ isn’t working! It works 100% fine on the level blueprint, but on my class blueprint when I press the input key, nothing appears to happen on the blueprint, even though it does actually read and use the input! Is this a bug?

In fact I think I may have figured it out - I think it might be because of the Debug Filter dropdown? Is there no way to just set ‘the class as a whole’ as the debug target, because I think right now as it’s set to a specific instance and the input is being called on the class as a whole, it’s not registering?

Hello again Beacon,

Ok, so after more testing it seems like the input does actually work

So have you solved the problem? Can you describe your solution here?

but on my class blueprint when I press the input key, nothing appears to happen on the blueprint, even though it does actually read and use the input! Is this a bug?

In fact I think I may have figured it out - I think it might be because of the Debug Filter dropdown? Is there no way to just set ‘the class as a whole’ as the debug target, because I think right now as it’s set to a specific instance and the input is being called on the class as a whole, it’s not registerig?

Debug filter may be empty if BP doesn’t exist in the world.(as Eg: you’re spawn actors of bp in runtime) if so you need to set specific target in filter manually in runtime while you’re debugging.

But anyway debug can’t block functionality of your BP.

Cheers,

It turns out there wasn’t exactly a problem as I saw it in the first place - the input was being received but as I elaborate below, it wasn’t on a specific instance meaning there was no debug tracing, so I thought the input wasn’t being activated.

So, is there no way to debug class blueprints when the behaviour is not limited to a specific instance of the class? I get no flow-tracing at all if I don’t perform functions on specific instances but on the class as a whole, which is the behaviour I need…

For example, I have many instances of my class in the world, and I need to perform actions on them all (which I’m using Get All Actors of Class then a For Each to do), but I can’t actually debug anything because it’'s class behaviour not specific to an instance…

The main reason this is causing a problem is because I have a boolean value that isn’t being updated properly that all my other behaviour relies on, and I can’t trace to see where the problem is.

It seems like the boolean isn’t able to be accessed by all the functions of my class blueprint, even though the boolean is set as public and it’s native to the class blueprint itself.

This means that when I go into a function and then check the status of the boolean, it’s out of scope, and useless. Nothing I can find will allow me to keep this boolean for use across every function of my class, nor can I seem to transfer it through inputs/outputs of functions… Can you help?

So, is there no way to debug class blueprints when the behaviour is not limited to a specific instance of the class? I get no flow-tracing at all if I don’t perform functions on specific instances but on the class as a whole, which is the behaviour I need…

Breakpoints should help in this case. When break occur Debug Filter will choose instance with which action actually currently happen.

It seems like the boolean isn’t able to be accessed by all the functions of my class blueprint, even though the boolean is set as public and it’s native to the class blueprint itself.

This means that when I go into a function and then check the status of the boolean, it’s out of scope, and useless. Nothing I can find will allow me to keep this boolean for use across every function of my class, nor can I seem to transfer it through inputs/outputs of functions…

BP variable should be able to all function of this BP. Either way public this variable or not.

i’ll recommend to you to start research\checking for update of it variable and places where you getting it for pass to other part of your logic.

Have a nice weekend!

If it’s a pawn class or character you have to use “Possess” instead of “EnableInput”

reference: Simple pawn input controller not working - Blueprint - Unreal Engine Forums