Skip to content

Commit

Permalink
Merge pull request #1573 from CesiumGS/ue-53-plus
Browse files Browse the repository at this point in the history
Require UE 5.3+
  • Loading branch information
j9liu authored Dec 20, 2024
2 parents cbf40f2 + de88a09 commit 3c61d9a
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 231 deletions.
11 changes: 0 additions & 11 deletions .github/actions/install-unreal-macos/exclude-from-unzip.lst
Original file line number Diff line number Diff line change
@@ -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/*
Expand Down
118 changes: 0 additions & 118 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildApple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildLinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
printf '<?xml version="1.0" encoding="utf-8" ?>\n<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">\n <BuildConfiguration>\n <MaxParallelActions>2</MaxParallelActions>\n </BuildConfiguration>\n <SourceFileWorkingSet><Provider>None</Provider></SourceFileWorkingSet>\n</Configuration>\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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildWindows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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+.
Expand Down
2 changes: 1 addition & 1 deletion CesiumForUnreal.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Documentation/developer-setup-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!--!\cond DOXYGEN_EXCLUDE !-->> Note:<!--! \endcond --><!--! \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)
<!--!\cond DOXYGEN_EXCLUDE !-->> Note:<!--! \endcond --><!--! \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

Expand Down
6 changes: 3 additions & 3 deletions Documentation/using-prerelease-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -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).

Expand All @@ -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.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
20 changes: 7 additions & 13 deletions Source/CesiumRuntime/Private/CesiumFeaturesMetadataComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -583,7 +577,7 @@ static void ClearAutoGeneratedNodes(
FString Key = GetFeatureIdNode->GetDescription() + ParameterName;
TArray<FExpressionInput*> 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);
Expand All @@ -607,7 +601,7 @@ static void ClearAutoGeneratedNodes(
// Look for user-made connections to this property.
TArray<FExpressionInput*> 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);
Expand All @@ -634,7 +628,7 @@ static void ClearAutoGeneratedNodes(
// Look for user-made connections to this property.
TArray<FExpressionInput*> 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);
Expand Down Expand Up @@ -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;
}
Expand All @@ -692,7 +686,7 @@ static void ClearAutoGeneratedNodes(
FString Key = IfNode->GetDescription() + IfNodeName;
TArray<FExpressionInput*> 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);
Expand Down
Loading

0 comments on commit 3c61d9a

Please sign in to comment.