Skip to content

Commit e5d22b3

Browse files
committed
Merge remote-tracking branch 'origin/main' into multiple-cesium-ions
2 parents e3def95 + 194dce7 commit e5d22b3

File tree

7 files changed

+38
-7
lines changed

7 files changed

+38
-7
lines changed

CHANGES.md

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
- Significantly improved tile download performance by adding `HttpThreadActiveFrameTimeInSeconds=0.001` to `Engine.ini`. This results in a major performance improvement for all tilesets, particularly Google Photorealistic 3D Tiles.
1313
- Added support for multiple Cesium ion servers by creating `CesiumIonServer` data assets.
1414

15+
##### Fixes :wrench:
16+
17+
- Fixed a bug in the "Select New Token" dialog that caused an error when trying to create a new token without being connected.
18+
- Fixed a bug where an EditCondition was not parsed correctly and caused Output Log window errors.
19+
- Removed query parameters from filepaths if present, as they are no longer ignored by Unreal. This fixes a bug where the URL would not load correctly in some cases.
20+
- Fixed a Tile Excluder bug that computed incorrect tile bounds, making tiles invisible when moving the tileset in the sample scene.
21+
1522
### v2.0.0 - 2023-11-01
1623

1724
This release no longer supports Unreal Engine v5.0. Unreal Engine v5.1, v5.2, or v5.3 is required.

Source/CesiumEditor/Private/SelectCesiumIonToken.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,10 @@ void SelectCesiumIonToken::Construct(const FArguments& InArgs) {
228228
this->_useExistingToken.token.token =
229229
TCHAR_TO_UTF8(*pServer->DefaultIonAccessToken);
230230
this->_specifyToken.token = pServer->DefaultIonAccessToken;
231-
this->_tokenSource = pServer->DefaultIonAccessToken.IsEmpty()
232-
? TokenSource::Create
233-
: TokenSource::Specify;
231+
this->_tokenSource =
232+
pServer->DefaultIonAccessToken.IsEmpty() && pSession->isConnected()
233+
? TokenSource::Create
234+
: TokenSource::Specify;
234235

235236
this->createRadioButton(
236237
pSession,

Source/CesiumRuntime/Private/Cesium3DTileset.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ ACesium3DTileset::ACesium3DTileset()
105105
this->Root = this->RootComponent;
106106

107107
PlatformName = UGameplayStatics::GetPlatformName();
108+
109+
#if WITH_EDITOR
110+
bIsMac = PlatformName == TEXT("Mac");
111+
#endif
108112
}
109113

110114
ACesium3DTileset::~ACesium3DTileset() { this->DestroyTileset(); }

Source/CesiumRuntime/Private/CesiumTile.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ bool UCesiumTile::PrimitiveBoxFullyContainsTileBounds(
2626

2727
FBoxSphereBounds UCesiumTile::CalcBounds(const FTransform& LocalToWorld) const {
2828
FBoxSphereBounds bounds = std::visit(
29-
CalcBoundsOperation{
30-
LocalToWorld * this->GetComponentTransform(),
31-
this->_tileTransform},
29+
CalcBoundsOperation{LocalToWorld, this->_tileTransform},
3230
_tileBounds);
3331
return bounds;
3432
}

Source/CesiumRuntime/Private/Tests/UnrealAssetAccessor.spec.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,13 @@ void FUnrealAssetAccessorSpec::Define() {
7676

7777
TestAccessorRequest(Uri, randomText);
7878
});
79+
80+
It("Can access file:/// URLs with unnecessary query params", [this]() {
81+
FString Uri = TEXT("file:///") + Filename;
82+
Uri.ReplaceCharInline('\\', '/');
83+
Uri.ReplaceInline(TEXT(" "), TEXT("%20"));
84+
Uri.Append("?version=4.27.1");
85+
86+
TestAccessorRequest(Uri, randomText);
87+
});
7988
}

Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,13 @@ std::string convertFileUriToFilename(const std::string& url) {
341341
result.resize(end);
342342
}
343343

344+
// Remove query parameters from the URL if present, as they are no longer
345+
// ignored by Unreal.
346+
size_t pos = result.find("?");
347+
if (pos != std::string::npos) {
348+
result.erase(pos);
349+
}
350+
344351
return result;
345352
}
346353

Source/CesiumRuntime/Public/Cesium3DTileset.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor {
800800
BlueprintGetter = GetEnableWaterMask,
801801
BlueprintSetter = SetEnableWaterMask,
802802
Category = "Cesium|Rendering",
803-
meta = (EditCondition = "PlatformName != TEXT(\"Mac\")"))
803+
meta = (EditCondition = "!bIsMac"))
804804
bool EnableWaterMask = false;
805805

806806
/**
@@ -894,6 +894,11 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor {
894894
UPROPERTY()
895895
FString PlatformName;
896896

897+
#if WITH_EDITORONLY_DATA
898+
UPROPERTY()
899+
bool bIsMac;
900+
#endif
901+
897902
public:
898903
UFUNCTION(BlueprintGetter, Category = "Cesium")
899904
float GetLoadProgress() const { return LoadProgress; }

0 commit comments

Comments
 (0)