cesium-unreal
cesium-unreal copied to clipboard
Add FAQ item about Cesium for Unreal requiring C++17
When using the source version of the plugin in an Unreal Engine project that calls Cesium for Unreal code, you must specify the cpp17 build flag or it won't compile.
PrivateDependencyModuleNames.AddRange(new string[] { "CesiumRuntime" });
CppStandard = CppStandardVersion.Cpp17;
otherwise it errors:

It would be great to document this somewhere, though I'm not sure where would be most appropriate. The developer setup guide seems best but it's really just an overview page at the moment.
Cesium for Unreal's header files require C++17, so any source file that includes them must be compiled for C++17. I think this will be true no matter if the plugin is included in the project or is installed as an engine plugin. I think the best place for this information is probably the FAQ, since even people that aren't developing the plugin may run into this. Something like:
Q: Why do I get compiler errors when using Cesium for Unreal C++ code elsewhere?
A: Cesium for Unreal requires C++17, so any project or plugin that #include's any of Cesium for Unreal's header files must be compiled for C++17. To do that, add CppStandard = CppStandardVersion.Cpp17; to your .build.cs file.