From e475405850d8ed562397e578dbbbb04ab449c2e2 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Mon, 16 Aug 2021 15:53:55 -0700 Subject: [PATCH] Updating multiplayer auto-components to require the LocalPredictionPlayerInputComponent service if they use NetworkInputs. Without LocalPredictionPlayerInputComponent CreateInput and ProcessInput will never be called Signed-off-by: Gene Walters --- .../Code/Source/AutoGen/AutoComponent_Source.jinja | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Gems/Multiplayer/Code/Source/AutoGen/AutoComponent_Source.jinja b/Gems/Multiplayer/Code/Source/AutoGen/AutoComponent_Source.jinja index d2be2f682a..595efd76f4 100644 --- a/Gems/Multiplayer/Code/Source/AutoGen/AutoComponent_Source.jinja +++ b/Gems/Multiplayer/Code/Source/AutoGen/AutoComponent_Source.jinja @@ -1465,6 +1465,11 @@ namespace {{ Component.attrib['Namespace'] }} {% call(ComponentService) ParseComponentServiceNames(Component, ClassType, 'Required') %} required.push_back(AZ_CRC_CE("{{ ComponentService }}")); {% endcall %} + +{% if NetworkInputCount > 0 %} + // This component uses NetworkInputs so it requires LocalPredictionPlayerInputComponent which is responsible for calling CreateInput and ProcessInput + required.push_back(AZ_CRC_CE("LocalPredictionPlayerInputComponent")); +{% endif %} } void {{ ComponentBaseName }}::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)