Any events fired when moving a LevelInstance in Editor?

TL;DR - Are there any blueprint events like an Actor’s ConstructionScript that I can use to run scripts in the editor when a LevelInstance is moved?

Hi, y’all! I’m exploring DynamicMeshActors.

I’m trying to set up a system where the designer can place actors in the world to better visualize and manipulate the different steps of a GeneratedDynamicMeshActor.
For example, the DynamicMeshActor can check for a bunch of “AdditiveBox” and append cubes based on data in each additive box actor. Then they could do a similar thing to boolean subract a bunch of “SubractiveBox” actors. Then the dynamic mesh could apply a bevel to that finished product.

I currently trigger a rebuild inside of the ConstructionScripts of the Additive/Subtractive boxes. This means any time I move one of the builder actors, the DynamicMeshActor is instructed to rebuild.

I tried putting some instances of the Additive/Subtractive box actors into level instances and now I’m running into a problem where their ConstructionScripts never run because I’m moving the level instance and not the nested actors themselves.

Is there some obvious event I’m missing? Event WorldOriginLocationChanged does not appear to do what I hoped.

In the actor or component blueprints, you create a function or custom event with the Call In Editor bool checked. That creates a button that you can access on the details panel which can you click to execute the function or custom event. This only works if the function or custom event does not have inputs. The logic can trigger a rebuild of the DynamicMeshActor.

You can also use Editor Tools of your creation to create widges or scripted actions which perform the needed tasks.

I don’t have regular UE open atm, but I think you can subclass level instances. If so, maybe you could subclass a level instance and in its construction script, trigger a build of whichever DynamicMeshActor(s) you wish. I’m sure there are other options too.

1 Like

I think you can subclass level instances. If so, maybe you could subclass a level instance and in its construction script, trigger a build of whichever DynamicMeshActor(s) you wish.

This gave me exactly what I hoping for! Thank you!

1 Like