Setting a FActorSpawnParameters' variable's Template to "this" and then spawning an instance of the static mesh actor using the parameter causes the editor to crash.
1. Open UE4Editor (any project)
2. Add code to project based on StaticMeshActor (MyStaticMesh)
3. Add the following to the header file
virtual void BeginPlay() { static bool bSpawnedClone = false; if (!bSpawnedClone) { bSpawnedClone = true; FActorSpawnParameters Params; Params.Template = this; ACrashActor* Clone = GetWorld()->SpawnActor<ACrashActor>(GetClass(), Params); } }
4. Compile the code
5. Add instance of MyStaticMesh to the level and PIE
Result:
Editor will close immediately
Expected:
A copy of the actor placed in the level is spawned.
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
Delay nodes occasionally don't fire the "Completed" output in a nativized build
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
An error occurred while trying to generate project files !?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay |
---|---|
Affects Versions | 4.9 |
Target Fix | 4.9.1 |
Created | Sep 10, 2015 |
---|---|
Resolved | Sep 21, 2015 |
Updated | Apr 27, 2018 |