现在的位置: 首页 > 综合 > 正文

ogre1.8.0场景添加lua脚本

2018年02月09日 ⁄ 综合 ⁄ 共 376字 ⁄ 字号 评论关闭

今天终于把lua脚本加入cegui界面中了,感觉特兴奋。因为这个问题困扰我三天了,现在是该总结一下了。

//使用 脚本加载界面

mGUIRenderer=&CEGUI::OgreRenderer::bootstrapSystem();
//lua初始化
CEGUI::LuaScriptModule& scriptmod(CEGUI::LuaScriptModule::create());
//const int err_idx = 0;
CEGUI::System::getSingleton().setScriptingModule(&scriptmod);

CEGUI::System::getSingleton().executeScriptFile("../datafiles/lua_scripts/demo8.lua");

记得要把datafiles放在ogre中

抱歉!评论已关闭.