UE5.7为什么新建的C++项目添加的C++类会出现模板参数错误?

就像这样,我删除了缓存,更新了VS和UE5.7.1都还是这样,重新创建项目也一样

模板参数 “T” 未在 类模板 “UEStaticAssertCompleteType_Private::TUEStaticAssertTypeCheckerBase<<错误类型>>” 的模板参数列表中使用或无法从中推导
模板参数 “T” 未在 类模板 “TIsContiguousContainer<<错误类型>>” 的模板参数列表中使用或无法从中推导
数组的大小必须大于零
数组的大小必须大于零
数组的大小必须大于零
数组的大小必须大于零
数组的大小必须大于零

Make sure you installed all those checkboxes first:

And that your windows sdk matches with your windows exact version.

More detail on: Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community


I’ve installed all the components, but I’m still getting IntelliSense errors in VS. I really don’t know what to do anymore.
But thanks for your reply and help

I am unsure on the clustering of ?Korean? plus how Camal case can cause special clustering in English, so I can’t really read your original post.

after setting up Visual Studio, make sure to go to your .uproject→Right click→ (more options on windows 11) → “Generate Visual Studio files”

then inside the Visual Studio project, go to Tools→Options, there should be a section for Unreal Engine on the left hand menu (if there isn’t then a component is not selected properly at the installation step)

  • it might also be from an extension (I think Visual Studio should pull it automatically at some point) Extensions → “Manage Extensions” and search for “Unreal Engine”

in “Code Analysis”: make sure both bools are set to true, and in “Macro IntelliSense” that “Macro IntelliSense Support” is also set to True.

  • “Unreal Build Tool options” → ”Include all modules in targets” is also true

for the “Blueprints” section I find both of these produce too much spam, and can produce extra lines, and characters into headers, that just makes them harder to read.

then close Visual Studio, and re-open the .sln file

you might still get a message about “intelliSense could not generate around macros” for the most part that is Visual Studio being… not great, but it goes away after a few restarts, and the Header Tool and Build Tool (for me they generate purple underlines) that will cause a breaking build.