// {BEGIN_LICENSE} /* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ // {END_LICENSE} #include #include "${Name}EditorSystemComponent.h" #include <${Name}/${Name}TypeIds.h> namespace ${SanitizedCppName} { AZ_COMPONENT_IMPL(${SanitizedCppName}EditorSystemComponent, "${SanitizedCppName}EditorSystemComponent", ${SanitizedCppName}EditorSystemComponentTypeId); void ${SanitizedCppName}EditorSystemComponent::Reflect(AZ::ReflectContext* context) { if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class<${SanitizedCppName}EditorSystemComponent, AZ::Component>(); } } ${SanitizedCppName}EditorSystemComponent::${SanitizedCppName}EditorSystemComponent() { if (${SanitizedCppName}Interface::Get() == nullptr) { ${SanitizedCppName}Interface::Register(this); } } ${SanitizedCppName}EditorSystemComponent::~${SanitizedCppName}EditorSystemComponent() { if (${SanitizedCppName}Interface::Get() == this) { ${SanitizedCppName}Interface::Unregister(this); } } void ${SanitizedCppName}EditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { provided.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService")); } void ${SanitizedCppName}EditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { incompatible.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService")); } void ${SanitizedCppName}EditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) { } void ${SanitizedCppName}EditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) { } void ${SanitizedCppName}EditorSystemComponent::Activate() { ${SanitizedCppName}RequestBus::Handler::BusConnect(); } void ${SanitizedCppName}EditorSystemComponent::Deactivate() { ${SanitizedCppName}RequestBus::Handler::BusDisconnect(); } } // namespace ${SanitizedCppName}