UE4创造控制台变量(_杰森大师)

FAutoConsoleVariableRef

.CPP
include ""下面增加

static int32 名字=0;
FAutoConsoleVariableRef 自己定义这函数的名字(TEXT("/*游戏运行时,点击~输入这个text自己定义的名字*/COOP.Weapon"),名字,TEXT("用于干嘛"),ECVF_Cheat/*标志干嘛*/);
在后面的函数中增加定义

if(名字>0{
触发什么事件,自己写
}

最后在游戏运行时,点击~然后输入COOP.Weapon 1;就可以触发自己写的事件

发布了20 篇原创文章 · 获赞 1 · 访问量 2711

猜你喜欢

转载自blog.csdn.net/weixin_42295465/article/details/88303624