PopcornFX / O3DEPopcornFXPlugin

PopcornFX plugin for O3DE
https://www.popcornfx.com/
Other
13 stars 12 forks source link

SystemComponent SerializeContext warning #32

Closed mbalfour-amzn closed 1 year ago

mbalfour-amzn commented 1 year ago

When running O3DE development branch with PopcornFX, the following warning prints out when starting up the Editor:

==================================================================
Module Manager: Trace::Warning
 D:/github/o3de/Code/Framework/AzCore/AzCore/Module/ModuleManager.cpp(34): 'bool __cdecl AZ::ShouldUseSystemComponent(const class AZ::ComponentDescriptor &,const class AZStd::vector<class AZ::Crc32,class AZStd::allocator> &,const class AZ::SerializeContext &)'
Module Manager: Component type PopcornFXPreviewersSystemComponent not reflected to SerializeContext!

Since the class doesn't have any state, the fix might be as simple as implementing a Reflect function like the following:

    void PopcornFXPreviewersSystemComponent::Reflect(AZ::ReflectContext* context)
    {
        if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context); serialize)
        {
            serialize->Class<PopcornFXPreviewersSystemComponent>()->Version(0);
        }
    }
ValPKFX commented 1 year ago

Hi, The fix is included in the 2.15.1 release but it was missing the parent class. I've fixed it on the development branch and the final fix will be included in the 2.15.2 release. Thank you!