这样一个问题,我在虚幻引擎4中有一个显示器模型,我需要确保该显示器上有按钮和文本,按钮必须正常工作(即我按下按钮,显示器上出现某种铭文) ,不知道如何用蓝图来完成此操作,提前致谢。
主页
/
user-559539
Ruslan's questions
我想连接luabridge库,该库允许您将lua脚本连接到c ++,但是什么也没发生,出现错误,我什至不知道如何修复
代码:
#include <LuaBridge.h>
#include <iostream>
#include <string>
extern "C" {
# include "lua.h"
# include "lauxlib.h"
# include "lualib.h"
}
using namespace luabridge;
int main() {
lua_State* L = luaL_newstate();
luaL_dofile(L, "script.lua");
luaL_openlibs(L);
lua_pcall(L, 0, 0, 0);
LuaRef s = getGlobal(L, "testString");
LuaRef n = getGlobal(L, "number");
std::string luaString = s.cast<std::string>();
int answer = n.cast<int>();
std::cout << luaString << std::endl;
std::cout << "And here's our number:" << answer << std::endl;
}