// {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 <${SanitizedCppName}Component.h> #include #include #include namespace ${GemName} { AZ_COMPONENT_IMPL(${SanitizedCppName}Component, "${SanitizedCppName}Component", "{${Random_Uuid}}"); void ${SanitizedCppName}Component::Activate() { ${SanitizedCppName}RequestBus::Handler::BusConnect(GetEntityId()); } void ${SanitizedCppName}Component::Deactivate() { ${SanitizedCppName}RequestBus::Handler::BusDisconnect(GetEntityId()); } void ${SanitizedCppName}Component::Reflect(AZ::ReflectContext* context) { if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class<${SanitizedCppName}Component, AZ::Component>() ->Version(1) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) { editContext->Class<${SanitizedCppName}Component>("${SanitizedCppName}Component", "[Description of functionality provided by this component]") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "ComponentCategory") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Component_Placeholder.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ; } } if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->Class<${SanitizedCppName}Component>("${SanitizedCppName} Component Group") ->Attribute(AZ::Script::Attributes::Category, "${GemName} Gem Group") ; } } void ${SanitizedCppName}Component::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { provided.push_back(AZ_CRC_CE("${SanitizedCppName}ComponentService")); } void ${SanitizedCppName}Component::GetIncompatibleServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& incompatible) { } void ${SanitizedCppName}Component::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) { } void ${SanitizedCppName}Component::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) { } } // namespace ${GemName}