It seems I am able to extract all the info, I get the mesh and send that off to Spawn an Actor… but all the variables get left behind and are not attached to the new Actor.
How to Spawn an Actor from a Data Table and also bring in not just the mesh, but also its variables.
Create a struct variable inside the actor, flag it as Instance Editable
and Exposed on Spawn
. This will show a new pin on the spawn node, plug the DT struct there.
You may want to tap into inheritance and do it on the base class since you’re pluggin class directly.
I have added the variables (Single: Floats) to match each each of the items to the Actor BP. Now I can link them to the SpawnActor node from the Break Node.
I guess now I need to figure out how to transfer the mesh over to this node because when I connect the “Blueprint” out from the Break Node, those variables go away. Edit: Stopped using the Blueprint out and set a “Set Static Mesh” Node after the SpawnActor Node and set the static mesh there.
I think that was it, thanks
Just add the struct - that’s the whole point. So you do not need to use separate variables.
Yiu give the actor an entire struct, and then set their own mesh internally when constructed. They break the struct apart and fetch what is needed. All inside that actor.
Can you be more specific on adding the struct?
I see a lot of options for that
What do you mean? Don’t you want the actor to have access to the struct you have in the DT? sProducts?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.