Access a variable from editor utility widget when spawning an actor

Hi,

I am new to unreal engine and the version that I use is 4.26. The issue is about the communication between an Editor Utility Widget and an Actor, most likely. I am struggling with this for days now.

The plan:

If a button is pressed in the Editor Utility Widget an Actor is spawned at a location.

When the button is pressed in the EUW there will be changes in some variables which should be passed to the construction script of the Actor.

The issue:

I can’t get the values of those variables in the Actor’s blueprint.

Minimalistic representation of the issue:

In EUW:

In Actor’s construction script.

336372-actor.png

So far I have looked at setting the variable public, casting, event dispatcher, but failed miserably and I am kind of totally lost :). I did not find this specific issue which would focus on EUWs, however there is this video: [UE4] How to CAST! (Casting to objects and classes) - YouTube, which is most likely close to this problem. It might be possible to save the values into a file and then read them (Unreal Concepts - Updating Data From a Text File at Runtime ( UE4 ) - YouTube) but there must be a better way to do this.

Eventually I would like to use this for meshes and variables would be vertices triangles uvs.

Try it like this, see if it behaves.

  • a new variable in the actor:

336359-screenshot-4.png

  • in the EUW:

I don’t think the Construction Script will print it, but the data will be there. Select the Actor in the World Outliner and see if the value you sent adds up.

Wow, nice, it works. thank you so much!