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].

Steps to Reproduce
  1. Open UE4 Editor (Third Person Template project)
  2. Add class based on BlueprintFunctionLibrary (MyFunctionLib)
  3. Add the following to MyFunctionLib.h
    UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = Default)
         static void MyTestFunc(UObject* WorldContextObject, TSubclassOf<AActor> 
    actorClass, AActor* actorTemplate, FTransform position);
  4. Add the following to MyFunctionLib.cpp
    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);
  5. Compile
  6. In the level blueprint, add MyTestFunc node
  7. Add a reference to the ThirdPersonCharacter (TPC) from the level
  8. From the TPC reference, create GetClass node
  9. Wire TPC ref to Actor Template pin and GetClass node into Actor Class pin of MyTestFunc
  10. Create keyboard event node and wire into MyTestFunc execution input
  11. PIE
  12. Move Character and press keyboard event key while moving

No new input can be read after new character is spawned

Original character retains camera/keyboard movement when new character is spawned

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-46036 in the post.

Login to Vote

ComponentUE - Gameplay - Input
Affects Versions4.17
Target Fix4.24
Fix Commit7708885
Main Commit7988574
Release Commit9552237
CreatedJun 14, 2017
ResolvedAug 5, 2019
UpdatedOct 28, 2019
View Jira Issue