/* * 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 * */ #include "RecastNavigationMeshComponent.h" #include namespace RecastNavigation { RecastNavigationMeshComponent::RecastNavigationMeshComponent(const RecastNavigationMeshConfig& config) : BaseClass(config) { } void RecastNavigationMeshComponent::Reflect(AZ::ReflectContext* context) { BaseClass::Reflect(context); if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() ->Version(1); } if (auto behaviorContext = azrtti_cast(context)) { behaviorContext->ConstantProperty("RecastNavigationMeshComponentTypeId", BehaviorConstant(AZ::Uuid(RecastNavigationMeshComponentTypeId))) ->Attribute(AZ::Script::Attributes::Module, "navigation") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common); behaviorContext->EBus("RecastNavigationMeshRequestBus") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "navigation") ->Attribute(AZ::Script::Attributes::Category, "Recast Navigation") ->Event("UpdateNavigationMesh", &RecastNavigationMeshRequests::UpdateNavigationMeshBlockUntilCompleted) ->Event("UpdateNavigationMeshAsync", &RecastNavigationMeshRequests::UpdateNavigationMeshAsync); behaviorContext->Class()->RequestBus("RecastNavigationMeshRequestBus"); behaviorContext->EBus("RecastNavigationMeshNotificationBus") ->Handler(); } } } // namespace RecastNavigation