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 <genewalt@amazon.com>
This commit is contained in:
Gene Walters
2021-08-16 15:53:55 -07:00
parent 9a8a411a0b
commit e475405850
@@ -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)