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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user