Change Spawn Actor from Class input?

How can I make use of that input without predefining the class?

This is what I like to do:

But it seems I can’t change that input at all?

Or can I copy paste a actor somehow at runtime?

Hi ,

I’ve moved your post to our Bug Report section due to the nature of the post. Thank you for bringing up this issue to us as this is what I would consider a bug. I’ve placed a bug report into our database for this issue. For your reference, the bug number is: UE-15480. Sadly I can’t think of any workarounds for the issue at the moment. We’ll work to get this fixed as soon as possible.

Have a nice day,

The bug is still being looked into but I’ve found a work around for the issue to use in the meantime. If you use a ‘Select’ node you could feed it all of the classes that this could possibly spawn. After doing that, you can set up conditions to test which class the actor that is coming from Hit Actor is, pass that select that option on the Select node, and connect it to the Spawn Actor node.

I hope this can help until the issue is properly resolved

Thanks, that should be good enough in my case.

I need to do the same, but mine is required for spawning actors into and out of an inventory as they are picked up or dropped. There could be a hundred different blueprint actor class types, each with different properties, so a select is not useful.

All the inventory examples I have found seem to have a small amount of predefined actors, but I’m hoping i have missed one where this is not done.

My current workaround is to add the pickupable actor into an array and hide it from the world, and when dropping it place it in front of the actor and make visible, but this seems awkward. If I spawn into the world, the physics look better, so hopefully there is another workaround, or this will be addressed at some point.

This has been reported as a bug and should be fixed in a future update. I’ll be sure to update here when the problem is fixed, but in the meantime the workaround I provided is the only thing I can provide as a temporary solution.

In case anyone has this issue in the future you can solve it by adding a ‘cast to actor class’ node in between get class and spawn actor.

Hi X5-495 ‘’,

That would be a suitable workaround in some situations but would not allow the blueprint to be versatile and be able to expect any class without pre-defining what classes to expect, as it will need to cast to each individual class.