当前位置:   article > 正文

UE4——(8)无法打开头文件ProceduralMeshComponent.h

proceduralmeshcomponent.h

1. 无法打开头文件ProceduralMeshComponent.h

在xxxx.Build.cs中添加ProceduralMeshComponent:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ProceduralMeshComponent" });

在xxxx.uproject中添加ProceduralMeshComponent:

  1. {
  2. "FileVersion": 3,
  3. "EngineAssociation": "4.26",
  4. "Category": "",
  5. "Description": "",
  6. "Modules": [
  7. {
  8. "Name": "SomeOne",
  9. "Type": "Runtime",
  10. "LoadingPhase": "Default",
  11. "AdditionalDependencies": [
  12. "Engine",
  13. "ProceduralMeshComponent"
  14. ]
  15. }
  16. ],
  17. "Plugins": [
  18. {
  19. "Name": "ProceduralMeshComponent",
  20. "Enabled": true
  21. }
  22. ]
  23. }

在两个json文件中添加完ProceduralMeshComponent可以正常编译,但是有红线报错。所以需要保留UE4项目删掉vs项目文件重新生成vs,把ProceduralMeshComponent源文件添加到vs库中。

选中文件保留,其余删掉,然后右键选中xxxx.uproject生成VS文件


参考https://blog.csdn.net/qq_31788759/article/details/104093259

2. 重新生成之后会有无法打开xxx.generated.h

有时候新建的C++类的头文件的#include “Actor.generated.h ”会报红,这时可以在VS里面   “解决方案里面“  先把 developmen editor 该为 debuggame  editor  ,然后点击项目,重新生成,生成成功后再改回 developmen editor,这样基本就解决了
原文链接:https://blog.csdn.net/qq_33727884/article/details/91966617

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/275455
推荐阅读
相关标签
  

闽ICP备14008679号