Switch FbxImportRequestHandler to inherit from AZ::Component instead of BehaviorComponent

Previously FbxImportRequestHandler used to be activated as part of DllMain init and never had CreateDescriptor called, which meant reflect was not called.  BehaviorComponents get created and Activated as part of special SceneCore logic.  Since this component now needs to be activated as part of the normal flow, reflecting it caused it to be picked up by the SceneCore activate logic, causing it to be created/activated twice
This commit is contained in:
amzn-mike
2021-05-19 23:22:44 -05:00
parent f5fab7e974
commit ca94c59e28
2 changed files with 3 additions and 3 deletions
@@ -61,7 +61,7 @@ namespace AZ
SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
if (serializeContext)
{
serializeContext->Class<FbxImportRequestHandler, SceneCore::BehaviorComponent>()->Version(1)->Attribute(
serializeContext->Class<FbxImportRequestHandler, AZ::Component>()->Version(1)->Attribute(
AZ::Edit::Attributes::SystemComponentTags,
AZStd::vector<AZ::Crc32>({AssetBuilderSDK::ComponentTags::AssetBuilder}));
@@ -31,11 +31,11 @@ namespace AZ
};
class FbxImportRequestHandler
: public SceneCore::BehaviorComponent
: public AZ::Component
, public Events::AssetImportRequestBus::Handler
{
public:
AZ_COMPONENT(FbxImportRequestHandler, "{9F4B189C-0A96-4F44-A5F0-E087FF1561F8}", SceneCore::BehaviorComponent);
AZ_COMPONENT(FbxImportRequestHandler, "{9F4B189C-0A96-4F44-A5F0-E087FF1561F8}");
~FbxImportRequestHandler() override = default;