Closed KieranCoppins closed 3 months ago
When do you get these errors? Are you trying to build the plugin yourself from source? Packaging a game using the official shipped 2.4.0 plugin? Something else?
I am building my Unreal project with visual studio, I have the plugin binaries downloaded from the 2.4.0 release in my plugins folder
Edit: I am building to open unreal engine editor, not packaging a project for a release
Seems to be building fine for me, when testing with cesium-unreal-samples.
Windows 10 Visual Studio Community 17.8.0 Unreal Engine 5.3.2 Cesium for Unreal 2.4.0
Here's what I did:
CesiumForUnreal-53-v2.4.0.zip
from the release pageSource
folder to cesium-unreal-samples/Source
. LinkCesiumForUnrealSamples.uproject
, "Generate Visual Studio project files"CesiumForUnrealSamples.sln
in Visual StudioI was able to build all 5 configurations successfully: DebugGame, DebugGame Editor, Development, Development Editor, and Shipping.
Anything in your workflow much different than this?
I'm not too familiar with the samples project setup. But we incorporate the binaries in the plugins directory of our unreal engine project. This works for cesium for unreal 2.3.0.
I have similar build errors with a source build of Unreal Engine 5.3.2 (release branch) and the v2.4.1 release zip of Cesium for Unreal. I get the same errors in v2.4.0. However, v2.3.0 builds successfully.
The build log below is from an empty C++ Unreal project, with the Cesium plugin added to the project's Plugins folder. I've had the same build error in the sample project.
I am using Windows 11 Pro, with Visual Studio Version 17.9.3.
Build started at 22:14... 1>------ Build started: Project: EpicGames.MsBuild, Configuration: Development Any CPU ------ 2>------ Build started: Project: EpicGames.IoHash, Configuration: Development Any CPU ------ 1>path\to\engine\Engine\Source\Programs\Shared\EpicGames.MsBuild\CsProjBuilder.cs(249,8,249,20): warning CA2200: Re-throwing caught exception changes stack information (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2200) 1>path\to\engine\Engine\Source\Programs\Shared\EpicGames.MsBuild\CsProjBuilder.cs(305,10,305,72): warning CA2249: Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249) 1>EpicGames.MsBuild -> path\to\engine\Engine\Source\Programs\Shared\EpicGames.MsBuild\bin\Development\net6.0\EpicGames.MsBuild.dll 2>EpicGames.IoHash -> path\to\engine\Engine\Source\Programs\Shared\EpicGames.IoHash\bin\Development\net6.0\EpicGames.IoHash.dll 1>Done building project "EpicGames.MsBuild.csproj". 3>------ Build started: Project: ProjectName, Configuration: Development_Editor x64 ------ 3>Using bundled DotNet SDK version: 6.0.302 3>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -Target="ProjectNameEditor Win64 Development -Project=\"path\to\project\ProjectName.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild 3>Log file: path\to\engine\Engine\Programs\UnrealBuildTool\Log.txt 3>Using 'git status' to determine working set for adaptive non-unity build (path\to\engine). 3>Creating makefile for ProjectNameEditor (no existing makefile) 3>Parsing headers for ProjectNameEditor 3> Running Internal UnrealHeaderTool "path\to\project\ProjectName.uproject" "path\to\project\Intermediate\Build\Win64\ProjectNameEditor\Development\ProjectNameEditor.uhtmanifest" -WarningsAsErrors 3>Total of 0 written 3>Reflection code generated for ProjectNameEditor in 4.6032855 seconds 3>Building ProjectNameEditor and ShaderCompileWorker... 3>Using Visual Studio 2022 14.36.32545 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10). 3>Determining max actions to execute in parallel (24 physical cores, 32 logical cores) 3> Executing up to 24 processes, one per physical core 3>------ Building 23 action(s) started ------ 3>[1/23] Compile [x64] ProjectName.cpp 3>[2/23] Link [x64] UnrealEditor-ProjectName.lib 3> Creating library path\to\project\Intermediate\Build\Win64\x64\UnrealEditor\Development\ProjectName\UnrealEditor-ProjectName.lib and object path\to\project\Intermediate\Build\Win64\x64\UnrealEditor\Development\ProjectName\UnrealEditor-ProjectName.exp 3>[3/23] Link [x64] UnrealEditor-ProjectName.dll 3> Creating library path\to\project\Intermediate\Build\Win64\x64\UnrealEditor\Development\ProjectName\UnrealEditor-ProjectName.sup.lib and object path\to\project\Intermediate\Build\Win64\x64\UnrealEditor\Development\ProjectName\UnrealEditor-ProjectName.sup.exp 3>[4/23] Compile [x64] PCH.CesiumRuntime.cpp 3>[5/23] Compile [x64] Module.CesiumRuntime.3.cpp 3>[6/23] Compile [x64] PCH.CesiumEditor.cpp 3>[7/23] Compile [x64] Module.CesiumRuntime.7.cpp 3>[8/23] Compile [x64] Module.CesiumRuntime.2.cpp 3>[9/23] Compile [x64] Module.CesiumRuntime.12.cpp 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C2065: 'ReadSurfaceCommand': undeclared identifier 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C3861: 'ENQUEUE_RENDER_COMMAND': identifier not found 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C2065: 'ENQUEUE_RENDER_COMMAND': undeclared identifier 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(413): error C3861: 'FlushRenderingCommands': identifier not found 3>[10/23] Compile [x64] Module.CesiumRuntime.1.cpp 3>[11/23] Compile [x64] Module.CesiumEditor.cpp 3>[12/23] Link [x64] UnrealEditor-CesiumEditor.lib 3> Creating library path\to\project\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumEditor\UnrealEditor-CesiumEditor.lib and object path\to\project\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumEditor\UnrealEditor-CesiumEditor.exp 3>[13/23] Compile [x64] Module.CesiumRuntime.6.cpp 3>[14/23] Compile [x64] Module.CesiumRuntime.5.cpp 3>[15/23] Compile [x64] Module.CesiumRuntime.4.cpp 3>[16/23] Compile [x64] Module.CesiumRuntime.11.cpp 3>[17/23] Compile [x64] Module.CesiumRuntime.8.cpp 3>[18/23] Compile [x64] Module.CesiumRuntime.9.cpp 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(544): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(569): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(582): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(606): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(633): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(679): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumFeaturesMetadataComponent.cpp(691): warning C4996: 'UMaterialExpression::GetInputs': Use GetInputsView() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumGltfPointsSceneProxy.cpp(54): warning C4996: 'FRenderResource::InitResource': InitResource now requires a command list. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumGltfPointsSceneProxy.cpp(55): warning C4996: 'FRenderResource::InitResource': InitResource now requires a command list. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(33): warning C4996: 'RHICreateBuffer': RHICreateBuffer is deprecated. Use FRHICommandListBase::CreateBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(40): warning C4996: 'RHILockBuffer': RHILockBuffer is deprecated. Use FRHICommandListBase::LockBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(54): warning C4996: 'RHIUnlockBuffer': RHIUnlockBuffer is deprecated. Use FRHICommandListBase::UnlockBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(144): warning C4996: 'RHICreateBuffer': RHICreateBuffer is deprecated. Use FRHICommandListBase::CreateBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(151): warning C4996: 'RHILockBuffer': RHILockBuffer is deprecated. Use FRHICommandListBase::LockBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumPointAttenuationVertexFactory.cpp(156): warning C4996: 'RHIUnlockBuffer': RHIUnlockBuffer is deprecated. Use FRHICommandListBase::UnlockBuffer instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>[19/23] Compile [x64] Module.CesiumRuntime.10.cpp 3>path\to\project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumTileExcluderAdapter.cpp(24): warning C4996: 'ACesiumGeoreference::GetGeoTransforms': Use transformation functions on ACesiumGeoreference and UCesiumWgs84Ellipsoid instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. 3>Total time in Parallel executor: 291.80 seconds 3>Total execution time: 306.90 seconds 3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""path\to\engine\Engine\Build\BatchFiles\Build.bat" -Target="ProjectNameEditor Win64 Development -Project=\"path\to\project\ProjectName.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6. 3>Done building project "ProjectName.vcxproj" -- FAILED. ========== Build: 2 succeeded, 1 failed, 8 up-to-date, 0 skipped ========== ========== Build completed at 22:19 and took 05:16.145 minutes ========== Visual Studio accelerated 5 project(s), copying 16 file(s). See https://aka.ms/vs-build-acceleration.
It sounds likely that the changes I implemented in this PR could fix these problems.
I was testing out dropping the plugin into an empty C++ Unreal project, similar to @easpden (except for UE 5.4). I encountered some of the same build errors, and put the fixes in that PR (along with the existing warning fixes)
Going to close this one.
PR #1384 was merged as well as official 5.4 support #1393 , where dropping the plugin into an Unreal project was tested in a few different ways.
I get a series of build errors with the latest Cesium For Unreal binaries.
Full Build Log
``` 1>[1/7] Compile [x64] CesiumTextureUtility.spec.cpp 1>Path\To\Project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C2065: 'ReadSurfaceCommand': undeclared identifier 1>Path\To\Project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C3861: 'ENQUEUE_RENDER_COMMAND': identifier not found 1>Path\To\Project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(392): error C2065: 'ENQUEUE_RENDER_COMMAND': undeclared identifier 1>Path\To\Project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Tests\CesiumTextureUtility.spec.cpp(413): error C3861: 'FlushRenderingCommands': identifier not found 1>[2/7] Compile [x64] CesiumEncodedFeaturesMetadata.cpp 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\INCLUDE\xsmf_control.h(153): error C2139: 'CesiumGltf::KhrTextureTransform': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_destructible' 1>Path\To\Project\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumEncodedFeaturesMetadata.h(16): note: see declaration of 'CesiumGltf::KhrTextureTransform' 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\INCLUDE\xsmf_control.h(153): note: see reference to variable template 'const bool conjunction_vOther information: