When a character is spawned from a template of an existing character instance, the existing instance loses the ability to read any input.
This was discovered when testing the crash fix for [Link Removed].
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = Default) static void MyTestFunc(UObject* WorldContextObject, TSubclassOf<AActor> actorClass, AActor* actorTemplate, FTransform position);
void MyFunctionLib::MyTestFunc(UObject* WorldContextObject, TSubclassOf<AActor> actorClass, AActor* actorTemplate, FTransform position)
{
FActorSpawnParameters SpawnInfo;
SpawnInfo.Template = actorTemplate;
auto actor = WorldContextObject->GetWorld()->SpawnActor<AActor>(actorClass, position, SpawnInfo);
}
Result:
No new input can be read after new character is spawned
Expected:
Original character retains camera/keyboard movement when new character is spawned
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-46036 in the post.
| 0 |
| Component | UE - Gameplay - Input |
|---|---|
| Affects Versions | 4.17 |
| Target Fix | 4.24 |
| Created | Jun 14, 2017 |
|---|---|
| Resolved | Aug 5, 2019 |
| Updated | Oct 28, 2019 |