Spawn Actor from Class seems to always return “None” when called from my Actor-derived blueprints.
If my parent class is GameMode, for instance, Spawn Actor from Class works. From there, I tried to use Spawn Actor from Class from within the newly spawned Actor, with Actor as the parent class, but it always returns “None.” I moved the logic back up to the GameMode Blueprint and it spawns the exact same class correctly.
Am I not supposed to be using the Spawn Actor from Class action in this way?
I put this in the Bug Reports section, only because the node shows in the palette for Actor derived classes.
Also, the documentation is vague as to where it can be used and not:
“In order to spawn an Actor, we will need to use the Spawn Actor from Class node. In this example, we are using the Level Blueprint, however you can use the Spawn Actor from Class node in most Blueprints where it can be found in the Palette window as shown below.”
If this node isn’t usable from Actor derived classes, can it be removed from the palette? I have spent a lot of time testing this over the past few weeks, and getting some kind of warning or not allowing me to use a node that doesn’t actually work would be awesome!
I hope this helps, and thanks for all of your hard work! You all deserve medals simply for attempting such an ambitious project.
First of all, you are using a BreakPoint so everything is stopping there. That’s the reason there is no Printing going on.
Second, the actor you want to spawn is at the moment being spawned at 0,0,0 location so may be missing it even it’s spawning.
It’s hard to say where you are doing this wrong because you don’t show the whole blueprint.
First put the actor that supposed to spawn that class on the map. Then create a Being Play Event and plug this spawn Actor into it, also specify a location so you can see if it’s spawned or not.
Try not using this as a function first. Make sure everything works on the Spawner first, then you can create a function later.
Sorry for late reply. Text doesn’t gets printed anyway, of course I tried it without breakpoints. About breakpoint - you right, I did break point at wrong place, it should be breakpoint somewhere on Print String.
Second, the actor you want to spawn is at the moment being spawned at 0,0,0 location so may be missing it even it’s spawning.
I don’t see it in Object Hierarchy or you know that explorer either. When I do spawn using spawn node - it works fine. Wonder if this behaviour it changed in 4.8.
Anyway I used add child actor component instead of spawn node