简体   繁体   English

在虚幻引擎中模拟输入

[英]Simulating Input in Unreal Engine

I am working on some automated testing in both UE4/UE5 and I was looking for a way to simulate the press of a input from both controller and keyboard.我正在 UE4/UE5 中进行一些自动化测试,我正在寻找一种方法来模拟来自 controller 和键盘的输入按下。

You question is tagged C++, but your question does not clearly state what you are looking for.你的问题被标记为C++,但是你的问题state并没有明确你要找的是什么。

You could use the Set Timer By Event function to test the behaviour you want.您可以使用Set Timer By Event function 来测试您想要的行为。 The node can trigger other nodes in an interval that you defined plugging a variable to the Time pin input.该节点可以在您定义的将变量插入Time引脚输入的时间间隔内触发其他节点。 You might use it to eg push a key or set some to (movement) axis to some value.例如,您可以使用它来按下一个键或将某些到(移动)轴设置为某个值。 The Event pin input could plug into eg a keystroke issued by you to start the simulation. Event引脚输入可以插入例如您发出的击键以启动模拟。 If you tick the Looping pin input to True the node will be executed after Time elapsed, which can be used to simulate a series of inputs.如果将Looping pin input 勾选为True ,节点将在Time elapsed 后执行,可用于模拟一系列输入。 Using the Timer Handle pin output you can invalidate the timer, that means stopping it.使用Timer Handle引脚 output 可以使定时器无效,这意味着停止它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM