Cesium terrain z values incorrect over large distance

Hi @Alec_Denny_Craine, I discovered if I use UE 5.5 instead of 5.2, then the buttons do show up!

Ok, so I started debugging… and the immediate problem is that the Blueprint function that gets attached to our OnHeightsSampled event is not marked CallInEditor. So Unreal just silently…doesn’t call it.

The problem is, I can’t see any way to set this flag. I tried a couple of things to fix this:

  1. Introducing a new explicit Function to be the target of the On Heights Sampled, and marking it CallInEditor. But this doesn’t work because Unreal seems to be introducing some other automatically generated function in between that is still not marked CallInEditor.

  2. Setting various other properties on the Actor, such as “Receives Editor Input” and “Is Editor Only Actor”. This was a bit of a long shot, but it doesn’t seem to help.

I also tried using an async function built into Unreal Engine, to see if there’s something specific about ours that is causing problems. So I set up this sequence in the EditorUtilityActor:

And despite this async function having Editor in the name, that “Delayed!” message is still not displayed because the implicit function Unreal has created is not marked CallInEditor. :roll_eyes:

So at this point, my conclusion is that EditorUtilityActors simply don’t work with Async functions, and this is a bug in Unreal Engine.

The good news, I think, is that the “Editor Utility Widget” that I created previously did work. It’s only the Editor Utility Actor that seems to be a problem. So… perhaps that is a usable workaround for you?

Thanks for that Kevin! What an annoying problem. There probably is a work around with the Editor Utility Widget, but I haven’t managed to figure it out - Loading an Editor Utility Widget with python seems to force it to be an Editor Utility Widget Blueprint which doesn’t allow you to run any of the functions in it for some reason. Glad you’ve managed to figure out what the problem is though!

@Kevin_Ring Just to let you know, there doesn’t seem to be a check that a tileset is actually plugged into the Cesium Sample Height Most Detailed, and if one is not plugged in it causes Unreal to Crash.

there doesn’t seem to be a check that a tileset is actually plugged into the Cesium Sample Height Most Detailed, and if one is not plugged in it causes Unreal to Crash.

Thanks, I wrote SampleHeightMostDetailed Blueprint function crashes if called without a valid tileset · Issue #1562 · CesiumGS/cesium-unreal · GitHub to capture this.