Spawn AIFrom Class resets child blueprint variables after a restart

Hi,

I have encountered a very strange behavior on Spawn AIFrom Class node. Here’s what happen:

  • Every time I hook up a child node into Spawn AI from class like so:

112401-spawnaifromclass.png

  • Restart UE4 Editor
  • Skeletal Mesh and Animation variable becomes “none”

  • Also collision preset has changed to Character Mesh

The rest of the variables are derived from the super class.

However when I changed Pawn Class to “None” in the Spawn AiFrom Class node, and restart UE4 editor. The child node got reverted back to the way it was i.e. Skeleton Mesh was set back to my model and Animation was set to the correct one. It’s so weird. So I’m guessing Spawn AIFrom class may have caused this problem?

Help would be greatly appreciated. It’s not very productive trying to set these variables every time I have to restart the UE4 editor.

Thanks,.

Hey malevolent,

I’m having a bit of trouble following your setup. Would you mind providing a list of repro steps I could follow to get the issue to occur on my end?

What I tried was creating an actor that spawned an AI character (AICharacter) and then in AICharacter I set the skeletal mesh and animation blueprints to something, and restarted the editor.

After the restart, the skeletal mesh and animation bp were not reset as you are experiencing.

Hi Sean,

Your AI character needs to be a child blueprint. A normal blueprint will work just fine.
I will be away for 3 weeks and without a workstation. I will try to make the repo steps when I get back.

Thanks for looking into it…

Hey malevolent,

Since you will be away for 3 weeks, I will be marking this topic as resolved. When you are back and able to compile a list of repro steps so we can reproduce the issue internally, please feel free to leave a comment to reopen this thread.

Have a great day

I am experiencing this exact issue. 4.16
Not sure if its the same cause, but I’m seeing the same results. Animbp and collision keep resetting.

Do me a favor and open up a new thread in the bug reports section. Please provide either a detailed list of repro steps or a simplified test project we can use to reproduce the issue, as well as as much information as you can regarding the issue.

Thank you

Just wanted to add that I’m seeing this in 4.16. My repro steps:

  1. Create a new blueprint class that is a child of Character class

  2. Specify a static mesh and anim blueprint as defaults

  3. Create two more blueprints that are children of this

  4. In one, specify a different mesh, keep everything else the same

  5. Place an instance of both of these blueprints in the world

  6. Setup a ‘respawn’ system using SpawnAIFromClass with one of those child blueprints and SpawnActor with the other (I have them hooked up to an OnDestroyed event)

  7. Save everything, restart the editor

  8. In the one with a different mesh, the anim blueprint has been reset to None, and in the one that had nothing changed, both the mesh and anim blueprint have been set to None - you’ll see an empty capsule in its place in the level.

I’ve no idea which parts of those steps are causing the problem, I’ve seen it come and go seemingly randomly but now is very consistent, and means I have to reset quite a few things every time I open the editor. :frowning:

Any workarounds would be greatly appreciated in the meantime! Thanks :slight_smile:

Hey Akryal,

Go ahead and test in 4.17, if you haven’t already. There have been some fixes that I think may resolve the issue. If you’re still running into it, let me know and I can take a closer look.

Thanks!