Spawn actor through construction script function doesn't work?

Hello, I’m really new to UE so I may be making a silly mistake somewhere.

I’m generating a hex grid world map, and then populating regions in a random way.

I want to have a text appear over each hex telling me which region they belong to.

I have the center coordinates for all the hexes, and I have created an actor with a textrender.

The hexes are created through a construction script in a blueprint that is already placed at 0,0,0 on the world map level, and one of the functions in that construction script will spawn the actor for the text.

For some reason that escapes me, the text is not being spawned. The text blueprint also does not appear in the debug list.

I tried placing the text actor in the world manually and then loading the map, and it appears properly, so the text itself works.

I don’t think you can spawn in construction.

1 Like

That was it, I changed it to spawn at beginplay and that solved it! Thanks!

2 Likes

If you want stuff to appear in construction, you can use ‘add static mesh component’ ( if you’re using meshes ). And there are various other nodes to add things to the BP.

You can also make an event graph node callable from the editor

and that will spawn.

But you can’t call that node from construction.

2 Likes