Skip to content

Commit

Permalink
Set bAllowAnyoneToDestroyMe on UCesiumRasterOverlay by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Aug 19, 2024
1 parent 5fe247f commit 40ce73f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
##### Additions :tada:

- Added universal (Intel and Apple Silicon) binaries for Unreal Engine 5.2. Unreal Engine 5.3 and 5.4 already had universal binaries.
- Raster overlays now have `bAllowAnyoneToDestroyMe` set to true by default. This allows them to be dynamically removed and destroyed at runtime via the Blueprint `Destroy Component` function called from anywhere, including Level Blueprints. Previously, attempting to delete a raster overlay from outside the Actor would result in an error.

##### Fixes :wrench:

Expand Down
6 changes: 5 additions & 1 deletion Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ UCesiumRasterOverlay::UCesiumRasterOverlay()
// don't need them.
PrimaryComponentTick.bCanEverTick = false;

// ...
// Allow DestroyComponent to be called from Blueprints by anyone. Without
// this, only the Actor (Cesium3DTileset) itself can destroy raster overlays.
// That's really annoying because it's fairly common to dynamically add/remove
// overlays at runtime.
bAllowAnyoneToDestroyMe = true;
}

#if WITH_EDITOR
Expand Down

0 comments on commit 40ce73f

Please sign in to comment.