UE4 读取XML插件制作
2017-06-01 16:31
295 查看
1.创建插件
2.将插件的类型从默认的Develop改为Runtime,这是为了是之后能够生成.lib文件
3.在插件ReadXML.Build.cs里包含相关的模块”XmlParser”
4.在插件的头文件中添加相关的xml头文件
5.添加XML文件
6..h添加函数
转载地址:http://blog.csdn.net/Szu_IT_Man/article/details/52776448
可参考http://blog.csdn.net/zilisen/article/details/72954339
2.将插件的类型从默认的Develop改为Runtime,这是为了是之后能够生成.lib文件
3.在插件ReadXML.Build.cs里包含相关的模块”XmlParser”
4.在插件的头文件中添加相关的xml头文件
5.添加XML文件
6..h添加函数
public: UFUNCTION(BlueprintCallable, Category ="MyPlugin") static boolReadXML(FString& MaxFPS, FString& SetRes, FString&ScreenPercentage);.cpp
bool UReadXMLBPLibrary::ReadXML( FString& MaxFPS, FString& SetRes, FString& ScreenPercentage ) { //Plugin的所在路径下的XmlFiles文件中的Setting.xml文件 if (FPlatformFileManager::Get().GetPlatformFile().FileExists(*(FPaths::GamePluginsDir() + L"XmlFiles\\Setting.xml"))) { UE_LOG(LogTemp, Warning, TEXT("Find XML File!")); FXmlFile*file = new FXmlFile(FPaths::GamePluginsDir() + L"XmlFiles\\Setting.xml"); FXmlNode*RootNode = file->GetRootNode(); FXmlNode*MaxFPSNode = RootNode->FindChildNode("MaxFPS"); MaxFPS = *MaxFPSNode->GetContent(); FXmlNode* SetresNode = RootNode->FindChildNode("Setres"); SetRes = *SetresNode->GetContent(); FXmlNode* ScreenPercentageNode = RootNode->FindChildNode("ScreenPercentage"); ScreenPercentage = *ScreenPercentageNode->GetContent(); return true; } else { UE_LOG(LogTemp, Warning, TEXT("Cannot Find XML File")); return false; } }8.保存后退出重新从VS打开项目(这步很重要!!)下面就能调用了
转载地址:http://blog.csdn.net/Szu_IT_Man/article/details/52776448
可参考http://blog.csdn.net/zilisen/article/details/72954339
相关文章推荐
- 【UE4学习】12_(XML)插件制作
- 【UE4学习】12_(XML)插件制作
- 在Eclipse中制作xml校验提示插件
- UE4制作插件的插件神器pluginCreator
- 2D游戏引擎制作:读取XML文件 4
- 使用 Asp(vbs) 来读取 XML 数据岛 来制作网站菜单
- 2D游戏引擎制作:读取XML文件 1
- UE4 读取XMl 方法一 继续FFastXml
- UE4制作插件的插件神器pluginCreator
- 在Eclipse中制作xml校验提示插件
- 2D游戏引擎制作:读取XML文件 3
- UE4读取脑电波MindWave插件(展示如何使用第三方库制作UE4插件)
- UE4制作插件的插件神器pluginCreator
- UE4读取本地XML文件
- [插件制作] Discuz!插件的通过数据库读取和缓存读取获取插件信息和参数
- UE4 读取XMl 方法二
- UE4读取本地XML文件
- Silverlight制作一个简单的菜单1-用到的知识讲解 xml数据读取,事件如何传递参数
- UE4制作插件的插件神器
- UE4读取本地XML文件