From de88a096a4f29bc8798bc287ae7e4945fbc2a0d0 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 20 Dec 2024 15:53:43 +1100 Subject: [PATCH] Require UE 5.3+. --- .../exclude-from-unzip.lst | 11 -- .github/workflows/build.yml | 118 ------------------ .github/workflows/buildAndroid.yml | 2 +- .github/workflows/buildApple.yml | 2 +- .github/workflows/buildLinux.yml | 2 +- .github/workflows/buildWindows.yml | 2 +- CHANGES.md | 6 + CesiumForUnreal.uplugin | 2 +- Documentation/developer-setup-windows.md | 4 +- Documentation/using-prerelease-packages.md | 6 +- README.md | 2 +- .../CesiumFeaturesMetadataComponent.cpp | 20 ++- .../Private/CesiumGltfPointsSceneProxy.cpp | 7 +- .../CesiumPointAttenuationVertexFactory.cpp | 38 +++--- .../CesiumPointAttenuationVertexFactory.h | 10 +- .../Private/CesiumTextureResource.cpp | 15 +-- .../Private/CesiumTextureResource.h | 4 - .../Private/CesiumTextureUtility.cpp | 4 - .../Private/CesiumViewExtension.cpp | 4 - .../Private/ExtensionImageAssetUnreal.cpp | 4 - Source/CesiumRuntime/Public/CesiumCommon.h | 2 - TestsProject/TestsProject.uproject | 4 +- extern/CMakeLists.txt | 4 +- extern/cesium-native | 2 +- extern/vcpkg-overlays/openssl/portfile.cmake | 4 +- .../triplets/arm64-android-unreal.cmake | 2 +- .../triplets/arm64-ios-unreal.cmake | 2 +- .../triplets/shared/osx-common.cmake | 2 +- .../triplets/x64-windows-unreal.cmake | 2 +- 29 files changed, 56 insertions(+), 231 deletions(-) diff --git a/.github/actions/install-unreal-macos/exclude-from-unzip.lst b/.github/actions/install-unreal-macos/exclude-from-unzip.lst index 871f0fa5d..c0660d002 100644 --- a/.github/actions/install-unreal-macos/exclude-from-unzip.lst +++ b/.github/actions/install-unreal-macos/exclude-from-unzip.lst @@ -1,14 +1,3 @@ -UE_5.2/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/* -UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/* -UE_5.2/Engine/Binaries/Mac/UnrealGame.app/* -UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/* -UE_5.2/Engine/Binaries/Mac/Android/* -UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame -UE_5.2/Engine/Binaries/Mac/UnrealGame -UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-Shipping -UE_5.2/Engine/Binaries/Mac/*.dSYM -UE_5.2/Engine/Plugins/Experimental/NNERuntimeIREE/* -UE_5.2/Engine/Plugins/Experimental/Avalanche/* UE_5.3/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/* UE_5.3/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/* UE_5.3/Engine/Binaries/Mac/UnrealGame.app/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67eaace3c..8d12b2c60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,124 +36,6 @@ jobs: with: name: ReferenceDocumentation path: Documentation/Reference - Windows52: - uses: ./.github/workflows/buildWindows.yml - secrets: inherit - with: - runner-label: windows-2022 - unreal-engine-version: "5.2.0" - unreal-engine-zip: "s3://cesium-unreal-engine/5.2.1/UE_5.2.1.zip" - unreal-program-name: "UE_5.2" - upload-package-base-name: "CesiumForUnreal-52-windows" - # These are specified in the Unreal Engine release notes under "IDE Version the Build farm compiles against" - # and using them ensures we're compiling our plugin in the exact same way that Unreal Engine itself is compiled. - cmake-generator: "Visual Studio 17 2022" - cmake-toolchain: "version=14.34" - cmake-platform: "x64,version=10.0.18362.0" - visual-studio-version: "2022" - visual-studio-components: "Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64,Microsoft.VisualStudio.Component.Windows10SDK.18362" - TestWindows52: - needs: [Windows52] - uses: ./.github/workflows/testWindows.yml - secrets: inherit - with: - runner-label: windows-2022 - unreal-engine-zip: "s3://cesium-unreal-engine/5.2.1/UE_5.2.1.zip" - unreal-program-name: "UE_5.2" - test-package-base-name: "CesiumForUnreal-52-windows" - Android52: - uses: ./.github/workflows/buildAndroid.yml - secrets: inherit - with: - runner-label: windows-2022 - unreal-engine-version: "5.2.0" - unreal-engine-zip: "s3://cesium-unreal-engine/5.2.1/UE_5.2.1.zip" - unreal-program-name: "UE_5.2" - upload-package-base-name: "CesiumForUnreal-52-android" - android-ndk-version: "r25b" - Linux52: - uses: ./.github/workflows/buildLinux.yml - secrets: inherit - with: - runner-label: ubuntu-22.04 - unreal-engine-version: "5.2.0" - unreal-engine-zip: "s3://cesium-unreal-engine/Linux_Unreal_Engine_5.2.0.zip" - unreal-program-name: "UE_5.2" - upload-package-base-name: "CesiumForUnreal-52-linux" - clang-version: "v21_clang-15.0.1-centos7" - Apple52: - uses: ./.github/workflows/buildApple.yml - secrets: inherit - with: - runner-label: macos-14 - unreal-engine-version: "5.2.0" - unreal-engine-zip: "s3://cesium-unreal-engine/UE_52_macOS.zip" - unreal-program-name: "UE_5.2" - upload-package-base-name: "CesiumForUnreal-52-apple" - xcode-version: "15.4" - Combine52: - runs-on: ubuntu-latest - needs: [Windows52, Linux52, Android52, Apple52] - steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Set environment variables - run: | - export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME - export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-52-${CESIUM_UNREAL_VERSION}" - export BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME="CesiumForUnreal-52-SourceOnly-${CESIUM_UNREAL_VERSION}" - # Make these available to subsequent steps - echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV - echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV - echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV - - name: Download Apple build - uses: actions/download-artifact@v4 - with: - name: CesiumForUnreal-52-apple-${{ env.CESIUM_UNREAL_VERSION}} - path: combine - - name: Download Android build - uses: actions/download-artifact@v4 - with: - name: CesiumForUnreal-52-android-${{ env.CESIUM_UNREAL_VERSION}} - path: combine - - name: Download Linux build - uses: actions/download-artifact@v4 - with: - name: CesiumForUnreal-52-linux-${{ env.CESIUM_UNREAL_VERSION}} - path: combine - - name: Download Windows build - uses: actions/download-artifact@v4 - with: - name: CesiumForUnreal-52-windows-${{ env.CESIUM_UNREAL_VERSION}} - path: combine - - name: Publish combined package artifact - if: ${{ success() }} - uses: actions/upload-artifact@v4 - with: - name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} - path: combine - - name: Publish combined package artifact for the Unreal Marketplace - if: ${{ success() }} - uses: actions/upload-artifact@v4 - with: - name: ${{ env.BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME}} - path: | - combine - # These are built by Epic, and including them seems to confuse their process. - !combine/CesiumForUnreal/Binaries/**/* - !combine/CesiumForUnreal/Intermediate/**/* - TestPackage52: - needs: [Combine52] - uses: ./.github/workflows/testPackageOnWindows.yml - secrets: inherit - with: - runner-label: windows-2022 - unreal-engine-zip: "s3://cesium-unreal-engine/5.2.1/UE_5.2.1.zip" - unreal-program-name: "UE_5.2" - unreal-engine-association: "5.2" - test-package-base-name: "CesiumForUnreal-52" - visual-studio-version: "2022" - visual-studio-components: "Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64,Microsoft.VisualStudio.Component.Windows10SDK.18362" Windows53: uses: ./.github/workflows/buildWindows.yml secrets: inherit diff --git a/.github/workflows/buildAndroid.yml b/.github/workflows/buildAndroid.yml index 44cbaf680..bc63ba42d 100644 --- a/.github/workflows/buildAndroid.yml +++ b/.github/workflows/buildAndroid.yml @@ -77,7 +77,7 @@ jobs: rm -r -fo extern - name: Overwrite plugin engine version run: | - ((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.2.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin + ((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.3.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin - name: Customize BuildConfiguration.xml run: | mkdir -p "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" diff --git a/.github/workflows/buildApple.yml b/.github/workflows/buildApple.yml index 86b1173b3..426360390 100644 --- a/.github/workflows/buildApple.yml +++ b/.github/workflows/buildApple.yml @@ -132,7 +132,7 @@ jobs: rm -rf extern - name: Build plugin for macOS and iOS run: | - sed -i '' 's/\"EngineVersion\": \"5.2.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin + sed -i '' 's/\"EngineVersion\": \"5.3.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin export UNREAL_ENGINE_DIR=$HOME/${{ inputs.unreal-program-name }} cd $UNREAL_ENGINE_DIR/Engine/Build/BatchFiles ./RunUAT.sh BuildPlugin -Plugin="$GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Mac+iOS -Architecture_Mac=arm64+x64 diff --git a/.github/workflows/buildLinux.yml b/.github/workflows/buildLinux.yml index 9ddea5628..5aa1990a1 100644 --- a/.github/workflows/buildLinux.yml +++ b/.github/workflows/buildLinux.yml @@ -97,7 +97,7 @@ jobs: printf '\n\n \n 2\n \n None\n\n' > ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - name: Build plugin run: | - sed -i 's/\"EngineVersion\": \"5.2.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin + sed -i 's/\"EngineVersion\": \"5.3.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin cd $UNREAL_ENGINE_ROOT/Engine/Build/BatchFiles ./RunUAT.sh BuildPlugin -Plugin="$GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux - name: Fix RPATH diff --git a/.github/workflows/buildWindows.yml b/.github/workflows/buildWindows.yml index fde96b32e..9d6383e7b 100644 --- a/.github/workflows/buildWindows.yml +++ b/.github/workflows/buildWindows.yml @@ -112,7 +112,7 @@ jobs: rm -r -fo extern - name: Overwrite plugin engine version run: | - ((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.2.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin + ((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.3.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin - name: Customize BuildConfiguration.xml run: | mkdir -p "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool" diff --git a/CHANGES.md b/CHANGES.md index 27d97ebcd..b0e2fcb11 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### ? - ? + +##### Breaking Changes :mega: + +- Removed support for Unreal Engine 5.2. Unreal Engine 5.3 or later is now required. + ### v2.11.0 - 2024-12-02 This is the last release of Cesium for Unreal that will support Unreal Engine v5.2. Future versions will require Unreal Engine v5.3+. diff --git a/CesiumForUnreal.uplugin b/CesiumForUnreal.uplugin index 87fae5796..59d77f35d 100644 --- a/CesiumForUnreal.uplugin +++ b/CesiumForUnreal.uplugin @@ -10,7 +10,7 @@ "DocsURL": "https://cesium.com/learn/unreal/", "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/87b0d05800a545d49bf858ef3458c4f7", "SupportURL": "https://community.cesium.com", - "EngineVersion": "5.2.0", + "EngineVersion": "5.3.0", "CanContainContent": true, "IsBetaVersion": false, "IsExperimentalVersion": false, diff --git a/Documentation/developer-setup-windows.md b/Documentation/developer-setup-windows.md index e776e399c..870e639e1 100644 --- a/Documentation/developer-setup-windows.md +++ b/Documentation/developer-setup-windows.md @@ -10,10 +10,10 @@ Detailed instructions for setting up a Cesium for Unreal development environment - Under **Workloads**, check `Desktop development with C++` - Under **Workloads**, check `Game development with C++` - Under **Individual components**, check `.NET Framework 4.8 SDK` (or newer) - > Note: Visual Studio options are derived from Unreal Engine's [recommended setup](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine?application_version=5.2) + > Note: Visual Studio options are derived from Unreal Engine's [recommended setup](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine?application_version=5.3) - Install the .NET Core 3.1 Runtime, [link](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-3.1.32-windows-x64-installer?cid=getdotnetcore) - For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower. -- Install the Unreal Engine (version 5.2 or newer) from https://www.unrealengine.com/en-US/download +- Install the Unreal Engine (version 5.3 or newer) from https://www.unrealengine.com/en-US/download ## To Cross Compile Android on Windows diff --git a/Documentation/using-prerelease-packages.md b/Documentation/using-prerelease-packages.md index 447c92633..abc9f0081 100644 --- a/Documentation/using-prerelease-packages.md +++ b/Documentation/using-prerelease-packages.md @@ -24,7 +24,7 @@ And scroll down to the Artifacts section: If there is no Artifacts section on that page, it's probably because the CI run is still in progress. Artifacts don't appear until the build is complete. -Find the appropriate ZIP file for your version of Unreal Engine. For example, `CesiumForUnreal-52-*.zip` is for Unreal Engine 5.2. Note that artifacts that name a platform will _only_ work on that platform, while artifacts without any platform in the name will work on _all_ platforms that Cesium for Unreal supports. So in most cases you should download an artifact without any platform in its name. +Find the appropriate ZIP file for your version of Unreal Engine. For example, `CesiumForUnreal-53-*.zip` is for Unreal Engine 5.3. Note that artifacts that name a platform will _only_ work on that platform, while artifacts without any platform in the name will work on _all_ platforms that Cesium for Unreal supports. So in most cases you should download an artifact without any platform in its name. Once you've downloaded the appropriate ZIP, move on to [installing a Cesium for Unreal ZIP](#installing-a-cesium-for-unreal-zip). @@ -48,7 +48,7 @@ And scroll down to the Artifacts section: If there is no Artifacts section on that page, it's probably because the CI run is still in progress. Artifacts don't appear until the build is complete. -Find the appropriate ZIP file for your version of Unreal Engine. For example, `CesiumForUnreal-52-*.zip` is for Unreal Engine 5.2. Note that artifacts that name a platform will _only_ work on that platform, while artifacts without any platform in the name will work on _all_ platforms that Cesium for Unreal supports. So in most cases you should download an artifact without any platform in its name. +Find the appropriate ZIP file for your version of Unreal Engine. For example, `CesiumForUnreal-53-*.zip` is for Unreal Engine 5.3. Note that artifacts that name a platform will _only_ work on that platform, while artifacts without any platform in the name will work on _all_ platforms that Cesium for Unreal supports. So in most cases you should download an artifact without any platform in its name. Once you've downloaded the appropriate ZIP, move on to [installing a Cesium for Unreal ZIP](#installing-a-cesium-for-unreal-zip). @@ -57,6 +57,6 @@ Once you've downloaded the appropriate ZIP, move on to [installing a Cesium for Once you've download a pre-release ZIP file using one of the methods above, you can install it into your Unreal Engine as follows: 1. If you previously installed the Cesium for Unreal plugin via the Unreal Engine Marketplace, uninstall it first. -2. Find Unreal Engine's `Engine/Plugins/Marketplace` directory. For example, on Unreal Engine 5.2 on Windows, this is typically `C:\Program Files\Epic Games\UE_5.2\Engine\Plugins\Marketplace`. You may need to create the `Marketplace` directory yourself. +2. Find Unreal Engine's `Engine/Plugins/Marketplace` directory. For example, on Unreal Engine 5.3 on Windows, this is typically `C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace`. You may need to create the `Marketplace` directory yourself. 3. If the `CesiumForUnreal` subdirectory already exists in this `Marketplace` directory, delete it first to make sure you're getting a clean installation. 4. Extract the release ZIP into this `Marketplace` directory. If you've done this correctly, you'll find a `CesiumForUnreal` sub-directory inside the `Marketplace` directory. diff --git a/README.md b/README.md index 98200900b..f2c95b5b7 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ The easiest way to install Cesium for Unreal is by downloading the officially re You can also find all releases on the [Releases](https://github.com/CesiumGS/cesium-unreal/releases) page. This is useful if you want an older version, or if you can't or don't want to use the Unreal Engine Marketplace. In particular, if you're using Linux, the Releases page is a better option. To install any of these releases: 1. If you previously installed the Cesium for Unreal plugin via the Unreal Engine Marketplace, uninstall it. -2. Extract the release ZIP to Unreal Engine's `Engine/Plugins/Marketplace` directory. For example, on Unreal Engine 5.2 on Windows, this is typically `C:\Program Files\Epic Games\UE_5.2\Engine\Plugins\Marketplace`. You may need to create the `Marketplace` directory yourself. +2. Extract the release ZIP to Unreal Engine's `Engine/Plugins/Marketplace` directory. For example, on Unreal Engine 5.3 on Windows, this is typically `C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace`. You may need to create the `Marketplace` directory yourself. 3. If you've done this correctly, you'll find a `CesiumForUnreal` sub-directory inside the `Marketplace` directory, and the plugin is ready to use. You can also [use pre-release packages](Documentation/using-prerelease-packages.md). diff --git a/Source/CesiumRuntime/Private/CesiumFeaturesMetadataComponent.cpp b/Source/CesiumRuntime/Private/CesiumFeaturesMetadataComponent.cpp index 55ba893e7..279b5c053 100644 --- a/Source/CesiumRuntime/Private/CesiumFeaturesMetadataComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumFeaturesMetadataComponent.cpp @@ -37,12 +37,6 @@ #include "Subsystems/AssetEditorSubsystem.h" #include "UObject/Package.h" -#if ENGINE_VERSION_5_3_OR_HIGHER -#define GET_INPUTS_MEMBER GetInputsView -#else -#define GET_INPUTS_MEMBER GetInputs -#endif - extern UNREALED_API class UEditorEngine* GEditor; using namespace CesiumEncodedFeaturesMetadata; @@ -545,7 +539,7 @@ static void ClearAutoGeneratedNodes( // Should not happen, but just in case, this node would be invalid. Break // any user-made connections to this node and don't attempt to remap it. for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { if (Input->Expression == GetFeatureIdNode && Input->OutputIndex == 0) { Input->Expression = nullptr; @@ -570,7 +564,7 @@ static void ClearAutoGeneratedNodes( // In case, treat the node as invalid. Break any user-made connections to // this node and don't attempt to remap it. for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { if (Input->Expression == GetFeatureIdNode && Input->OutputIndex == 0) { Input->Expression = nullptr; @@ -583,7 +577,7 @@ static void ClearAutoGeneratedNodes( FString Key = GetFeatureIdNode->GetDescription() + ParameterName; TArray Connections; for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { // Look for user-made connections to this node. if (Input->Expression == GetFeatureIdNode && Input->OutputIndex == 0) { Connections.Add(Input); @@ -607,7 +601,7 @@ static void ClearAutoGeneratedNodes( // Look for user-made connections to this property. TArray Connections; for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { if (Input->Expression == GetPropertyValueNode && Input->OutputIndex == OutputIndex) { Connections.Add(Input); @@ -634,7 +628,7 @@ static void ClearAutoGeneratedNodes( // Look for user-made connections to this property. TArray Connections; for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { if (Input->Expression == ApplyValueTransformNode && Input->OutputIndex == OutputIndex) { Connections.Add(Input); @@ -680,7 +674,7 @@ static void ClearAutoGeneratedNodes( // In case, treat the node as invalid. Break any user-made connections to // this node and don't attempt to remap it. for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { if (Input->Expression == IfNode && Input->OutputIndex == 0) { Input->Expression = nullptr; } @@ -692,7 +686,7 @@ static void ClearAutoGeneratedNodes( FString Key = IfNode->GetDescription() + IfNodeName; TArray Connections; for (UMaterialExpression* UserNode : Classification.UserAddedNodes) { - for (FExpressionInput* Input : UserNode->GET_INPUTS_MEMBER()) { + for (FExpressionInput* Input : UserNode->GetInputsView()) { // Look for user-made connections to this node. if (Input->Expression == IfNode && Input->OutputIndex == 0) { Connections.Add(Input); diff --git a/Source/CesiumRuntime/Private/CesiumGltfPointsSceneProxy.cpp b/Source/CesiumRuntime/Private/CesiumGltfPointsSceneProxy.cpp index fdcb8f26a..e4cc050de 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfPointsSceneProxy.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfPointsSceneProxy.cpp @@ -56,17 +56,12 @@ void FCesiumGltfPointsSceneProxy::CreateRenderThreadResources( AttenuationVertexFactory.InitResource(RHICmdList); AttenuationIndexBuffer.InitResource(RHICmdList); } -#elif ENGINE_VERSION_5_3_OR_HIGHER +#else void FCesiumGltfPointsSceneProxy::CreateRenderThreadResources() { FRHICommandListBase& RHICmdList = FRHICommandListImmediate::Get(); AttenuationVertexFactory.InitResource(RHICmdList); AttenuationIndexBuffer.InitResource(RHICmdList); } -#else -void FCesiumGltfPointsSceneProxy::CreateRenderThreadResources() { - AttenuationVertexFactory.InitResource(); - AttenuationIndexBuffer.InitResource(); -} #endif void FCesiumGltfPointsSceneProxy::DestroyRenderThreadResources() { diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp index 3e887424d..6453a5889 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp @@ -10,17 +10,8 @@ #include "RenderCommandFence.h" #include "Runtime/Launch/Resources/Version.h" -#if ENGINE_VERSION_5_3_OR_HIGHER -#define RHI_CREATE_BUFFER RHICmdList.CreateBuffer -#define RHI_LOCK_BUFFER RHICmdList.LockBuffer -#define RHI_UNLOCK_BUFFER RHICmdList.UnlockBuffer -#else -#define RHI_CREATE_BUFFER RHICreateBuffer -#define RHI_LOCK_BUFFER RHILockBuffer -#define RHI_UNLOCK_BUFFER RHIUnlockBuffer -#endif - -void FCesiumPointAttenuationIndexBuffer::INIT_RHI_SIGNATURE { +void FCesiumPointAttenuationIndexBuffer::InitRHI( + FRHICommandListBase& RHICmdList) { if (!bAttenuationSupported) { return; } @@ -32,7 +23,7 @@ void FCesiumPointAttenuationIndexBuffer::INIT_RHI_SIGNATURE { const uint32 NumIndices = NumPoints * 6; const uint32 Size = NumIndices * sizeof(uint32); - IndexBufferRHI = RHI_CREATE_BUFFER( + IndexBufferRHI = RHICmdList.CreateBuffer( Size, BUF_Static | BUF_IndexBuffer, sizeof(uint32), @@ -40,7 +31,7 @@ void FCesiumPointAttenuationIndexBuffer::INIT_RHI_SIGNATURE { CreateInfo); uint32* Data = - (uint32*)RHI_LOCK_BUFFER(IndexBufferRHI, 0, Size, RLM_WriteOnly); + (uint32*)RHICmdList.LockBuffer(IndexBufferRHI, 0, Size, RLM_WriteOnly); for (uint32 index = 0, bufferIndex = 0; bufferIndex < NumIndices; index += 4) { @@ -54,7 +45,7 @@ void FCesiumPointAttenuationIndexBuffer::INIT_RHI_SIGNATURE { Data[bufferIndex++] = index + 3; } - RHI_UNLOCK_BUFFER(IndexBufferRHI); + RHICmdList.UnlockBuffer(IndexBufferRHI); } class FCesiumPointAttenuationVertexFactoryShaderParameters @@ -129,25 +120,29 @@ class FCesiumPointAttenuationVertexFactoryShaderParameters */ class FCesiumPointAttenuationDummyVertexBuffer : public FVertexBuffer { public: - virtual void INIT_RHI_SIGNATURE override; + virtual void InitRHI(FRHICommandListBase& RHICmdList) override; }; -void FCesiumPointAttenuationDummyVertexBuffer::INIT_RHI_SIGNATURE { +void FCesiumPointAttenuationDummyVertexBuffer::InitRHI( + FRHICommandListBase& RHICmdList) { FRHIResourceCreateInfo CreateInfo( TEXT("FCesiumPointAttenuationDummyVertexBuffer")); - VertexBufferRHI = RHI_CREATE_BUFFER( + VertexBufferRHI = RHICmdList.CreateBuffer( sizeof(FVector3f) * 4, BUF_Static | BUF_VertexBuffer, 0, ERHIAccess::VertexOrIndexBuffer, CreateInfo); - FVector3f* DummyContents = (FVector3f*) - RHI_LOCK_BUFFER(VertexBufferRHI, 0, sizeof(FVector3f) * 4, RLM_WriteOnly); + FVector3f* DummyContents = (FVector3f*)RHICmdList.LockBuffer( + VertexBufferRHI, + 0, + sizeof(FVector3f) * 4, + RLM_WriteOnly); DummyContents[0] = FVector3f(0.0f, 0.0f, 0.0f); DummyContents[1] = FVector3f(1.0f, 0.0f, 0.0f); DummyContents[2] = FVector3f(0.0f, 1.0f, 0.0f); DummyContents[3] = FVector3f(1.0f, 1.0f, 0.0f); - RHI_UNLOCK_BUFFER(VertexBufferRHI); + RHICmdList.UnlockBuffer(VertexBufferRHI); } TGlobalResource @@ -184,7 +179,8 @@ void FCesiumPointAttenuationVertexFactory::ModifyCompilationEnvironment( #endif } -void FCesiumPointAttenuationVertexFactory::INIT_RHI_SIGNATURE { +void FCesiumPointAttenuationVertexFactory::InitRHI( + FRHICommandListBase& RHICmdList) { FVertexDeclarationElementList Elements; Elements.Add(AccessStreamComponent( FVertexStreamComponent( diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h index 0b09a7900..6b8f16c8d 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h @@ -11,12 +11,6 @@ #include "Runtime/Launch/Resources/Version.h" #include "SceneManagement.h" -#if ENGINE_VERSION_5_3_OR_HIGHER -#define INIT_RHI_SIGNATURE InitRHI(FRHICommandListBase& RHICmdList) -#else -#define INIT_RHI_SIGNATURE InitRHI() -#endif - /** * This generates the indices necessary for point attenuation in a * FCesiumGltfPointsComponent. @@ -28,7 +22,7 @@ class FCesiumPointAttenuationIndexBuffer : public FIndexBuffer { const bool bAttenuationSupported) : NumPoints(NumPoints), bAttenuationSupported(bAttenuationSupported) {} - virtual void INIT_RHI_SIGNATURE override; + virtual void InitRHI(FRHICommandListBase& RHICmdList) override; private: // The number of points in the original point mesh. Not to be confused with @@ -75,6 +69,6 @@ class FCesiumPointAttenuationVertexFactory : public FLocalVertexFactory { FShaderCompilerEnvironment& OutEnvironment); private: - virtual void INIT_RHI_SIGNATURE override; + virtual void InitRHI(FRHICommandListBase& RHICmdList) override; virtual void ReleaseRHI() override; }; diff --git a/Source/CesiumRuntime/Private/CesiumTextureResource.cpp b/Source/CesiumRuntime/Private/CesiumTextureResource.cpp index ea715d522..148bcf6f7 100644 --- a/Source/CesiumRuntime/Private/CesiumTextureResource.cpp +++ b/Source/CesiumRuntime/Private/CesiumTextureResource.cpp @@ -212,7 +212,7 @@ FTexture2DRHIRef createAsyncTextureAndWait( } return result; -#elif ENGINE_VERSION_5_3_OR_HIGHER +#else FGraphEventRef CompletionEvent; FTexture2DRHIRef result = RHIAsyncCreateTexture2D( @@ -230,15 +230,6 @@ FTexture2DRHIRef createAsyncTextureAndWait( } return result; -#else - return RHIAsyncCreateTexture2D( - SizeX, - SizeY, - Format, - NumMips, - Flags, - InitialMipData, - NumInitialMips); #endif } @@ -474,11 +465,7 @@ FCesiumTextureResource::FCesiumTextureResource( STAT(this->_lodGroupStatName = TextureGroupStatFNames[this->_textureGroup]); } -#if ENGINE_VERSION_5_3_OR_HIGHER void FCesiumTextureResource::InitRHI(FRHICommandListBase& RHICmdList) { -#else -void FCesiumTextureResource::InitRHI() { -#endif FSamplerStateInitializerRHI samplerStateInitializer( this->_filter, this->_addressX, diff --git a/Source/CesiumRuntime/Private/CesiumTextureResource.h b/Source/CesiumRuntime/Private/CesiumTextureResource.h index 4e7906c18..266acff39 100644 --- a/Source/CesiumRuntime/Private/CesiumTextureResource.h +++ b/Source/CesiumRuntime/Private/CesiumTextureResource.h @@ -96,11 +96,7 @@ class FCesiumTextureResource : public FTextureResource { uint32 GetSizeX() const override { return this->_width; } uint32 GetSizeY() const override { return this->_height; } -#if ENGINE_VERSION_5_3_OR_HIGHER virtual void InitRHI(FRHICommandListBase& RHICmdList) override; -#else - virtual void InitRHI() override; -#endif virtual void ReleaseRHI() override; #if STATS diff --git a/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp b/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp index aa6899e33..de72f0038 100644 --- a/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp +++ b/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp @@ -384,13 +384,9 @@ loadTextureGameThreadPart(LoadedTextureResult* pHalfLoadedTexture) { FRHICommandListImmediate& RHICmdList) { pTextureResource->SetTextureReference( pTexture->TextureReference.TextureReferenceRHI); -#if ENGINE_VERSION_5_3_OR_HIGHER pTextureResource->InitResource( FRHICommandListImmediate::Get()); // Init Resource now requires a // command list. -#else - pTextureResource->InitResource(); -#endif }); } diff --git a/Source/CesiumRuntime/Private/CesiumViewExtension.cpp b/Source/CesiumRuntime/Private/CesiumViewExtension.cpp index e91c860ce..04a8978d5 100644 --- a/Source/CesiumRuntime/Private/CesiumViewExtension.cpp +++ b/Source/CesiumRuntime/Private/CesiumViewExtension.cpp @@ -90,11 +90,7 @@ namespace { const TSet& getOcclusionHistorySet(const FSceneViewState* pViewState) { -#if ENGINE_VERSION_5_3_OR_HIGHER return pViewState->Occlusion.PrimitiveOcclusionHistorySet; -#else - return pViewState->PrimitiveOcclusionHistorySet; -#endif } } // namespace diff --git a/Source/CesiumRuntime/Private/ExtensionImageAssetUnreal.cpp b/Source/CesiumRuntime/Private/ExtensionImageAssetUnreal.cpp index c9f75ae97..df3e402a7 100644 --- a/Source/CesiumRuntime/Private/ExtensionImageAssetUnreal.cpp +++ b/Source/CesiumRuntime/Private/ExtensionImageAssetUnreal.cpp @@ -56,13 +56,9 @@ ExtensionImageAssetUnreal::getOrCreate( ENQUEUE_RENDER_COMMAND(Cesium_InitResource) ([pResource = extension._pTextureResource]( FRHICommandListImmediate& RHICmdList) mutable { -#if ENGINE_VERSION_5_3_OR_HIGHER pResource->InitResource( FRHICommandListImmediate::Get()); // Init Resource now requires a // command list. -#else - pResource->InitResource(); -#endif }); maybePromise->resolve(); diff --git a/Source/CesiumRuntime/Public/CesiumCommon.h b/Source/CesiumRuntime/Public/CesiumCommon.h index 17901acb2..d9880269d 100644 --- a/Source/CesiumRuntime/Public/CesiumCommon.h +++ b/Source/CesiumRuntime/Public/CesiumCommon.h @@ -8,5 +8,3 @@ (ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 5) #define ENGINE_VERSION_5_4_OR_HIGHER \ (ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 4) -#define ENGINE_VERSION_5_3_OR_HIGHER \ - (ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 3) diff --git a/TestsProject/TestsProject.uproject b/TestsProject/TestsProject.uproject index 7e940bfc4..3cc48f266 100644 --- a/TestsProject/TestsProject.uproject +++ b/TestsProject/TestsProject.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "5.2", + "EngineAssociation": "5.3", "Category": "", "Description": "", "Plugins": [ @@ -28,4 +28,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 5fce667b1..6fb030a0a 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -11,8 +11,8 @@ if (DEFINED ENV{UNREAL_ENGINE_ROOT} AND NOT UNREAL_ENGINE_ROOT) endif() if (NOT UNREAL_ENGINE_ROOT) - # On Windows, try to use the default UE 5.2 location - set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.2") + # On Windows, try to use the default UE 5.3 location + set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.3") if (WIN32 AND EXISTS "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") set(UNREAL_ENGINE_ROOT "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") else() diff --git a/extern/cesium-native b/extern/cesium-native index 1ece56dec..b4133893a 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 1ece56deca0cb068e720ae67ae716fe80ec231ac +Subproject commit b4133893aaa5e4fc7559dd4828d09ad27ee9bb02 diff --git a/extern/vcpkg-overlays/openssl/portfile.cmake b/extern/vcpkg-overlays/openssl/portfile.cmake index def5db6a0..1b2e50300 100644 --- a/extern/vcpkg-overlays/openssl/portfile.cmake +++ b/extern/vcpkg-overlays/openssl/portfile.cmake @@ -5,7 +5,7 @@ # The environment variable `UNREAL_ENGINE_ROOT` must be set to the root of the # Unreal Engine installation to use. It should use forward slashes even on Windows # and it should _not_ end with a slash. -# For example: `C:/Program Files/Epic Games/UE_5.2` +# For example: `C:/Program Files/Epic Games/UE_5.3` set(VCPKG_POLICY_EMPTY_PACKAGE enabled) @@ -16,7 +16,7 @@ endif() message(STATUS "Using Unreal Engine installation at $ENV{UNREAL_ENGINE_ROOT}") # Some old versions of UE used to have multiple versions of OpenSSL, with different versions used on different platforms. -# That is no longer the case in UE 5.2, 5.3, and 5.4, but the below logic may need to change if that ever happens again. +# That is no longer the case in UE 5.3, 5.4, and 5.5, but the below logic may need to change if that ever happens again. set(OPENSSL_VERSIONS_DIR "$ENV{UNREAL_ENGINE_ROOT}/Engine/Source/ThirdParty/OpenSSL") file(GLOB OPENSSL_POSSIBLE_ROOT_DIRS LIST_DIRECTORIES true "${OPENSSL_VERSIONS_DIR}/*") diff --git a/extern/vcpkg-overlays/triplets/arm64-android-unreal.cmake b/extern/vcpkg-overlays/triplets/arm64-android-unreal.cmake index e7e44d9df..b524359ac 100644 --- a/extern/vcpkg-overlays/triplets/arm64-android-unreal.cmake +++ b/extern/vcpkg-overlays/triplets/arm64-android-unreal.cmake @@ -9,6 +9,6 @@ set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=arm64-v8a) set(VCPKG_CMAKE_SYSTEM_VERSION 21) # From Unreal Build Tool: -# https://github.com/EpicGames/UnrealEngine/blob/5.2.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/Android/AndroidToolChain.cs +# https://github.com/EpicGames/UnrealEngine/blob/5.3.2-release/Engine/Source/Programs/UnrealBuildTool/Platform/Android/AndroidToolChain.cs set(VCPKG_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden") set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS}") diff --git a/extern/vcpkg-overlays/triplets/arm64-ios-unreal.cmake b/extern/vcpkg-overlays/triplets/arm64-ios-unreal.cmake index 0048c4b25..b9b971070 100644 --- a/extern/vcpkg-overlays/triplets/arm64-ios-unreal.cmake +++ b/extern/vcpkg-overlays/triplets/arm64-ios-unreal.cmake @@ -7,6 +7,6 @@ set(VCPKG_CMAKE_SYSTEM_NAME iOS) set(VCPKG_OSX_DEPLOYMENT_TARGET 15) # From Unreal Build Tool: -# https://github.com/EpicGames/UnrealEngine/blob/5.2.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSToolChain.cs +# https://github.com/EpicGames/UnrealEngine/blob/5.3.2-release/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSToolChain.cs set(VCPKG_CXX_FLAGS "-fvisibility=hidden") set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS}") diff --git a/extern/vcpkg-overlays/triplets/shared/osx-common.cmake b/extern/vcpkg-overlays/triplets/shared/osx-common.cmake index 4890a34e8..8875156f3 100644 --- a/extern/vcpkg-overlays/triplets/shared/osx-common.cmake +++ b/extern/vcpkg-overlays/triplets/shared/osx-common.cmake @@ -6,6 +6,6 @@ set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15) # From Unreal Build Tool: -# https://github.com/EpicGames/UnrealEngine/blob/5.2.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs +# https://github.com/EpicGames/UnrealEngine/blob/5.3.2-release/Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs set(VCPKG_CXX_FLAGS "-fvisibility-ms-compat -fvisibility-inlines-hidden") set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS}") diff --git a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake index 47c6df42b..cb2a5b2b5 100644 --- a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake +++ b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake @@ -15,7 +15,7 @@ set(VCPKG_POLICY_ONLY_RELEASE_CRT enabled) # Yeah that's not just the Windows SDK, but anything that passes structs across the boundary # between compilation units using different versions of that flag. We compile cesium-native # with this same option to avoid super-dodgy and hard to debug issues. -# https://github.com/EpicGames/UnrealEngine/blob/5.2.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/Windows/VCToolChain.cs +# https://github.com/EpicGames/UnrealEngine/blob/5.3.2-release/Engine/Source/Programs/UnrealBuildTool/Platform/Windows/VCToolChain.cs set(VCPKG_CXX_FLAGS "/Zp8") set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS}")