PopcornFX / O3DEPopcornFXPlugin

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

None of particles work with Development branch of O3DE #22

Closed SelfishOlex closed 2 years ago

SelfishOlex commented 2 years ago

I got the plugin to work with 22.05 but not with development branch of O3DE.

I'm tinkering around in dev branch yet again (PopcornFX 2.13.1). I am having issues with:

[Error] (PopcornFX) - PopcornFXAssetHandler: Unable to get product asset for popcornfxeffects/library/projectile_explosion.pkfx

Due to

bool    PopcornFXIntegration::LoadEffect(PopcornFXAsset asset, const charassetPath, const AZ::u8 *assetData, const AZ::IO::SizeType assetDataSize, [[maybe_unused]] const AZ::Data::AssetId &assetId)
{
#if defined(POPCORNFX_EDITOR)
    AZStd::string    rootPath = m_PackPath;
    AZStd::string    libraryPath;

    AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry    *product = AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry::GetProductByAssetId(assetId);
    if (product != null)

returning null for product This results in effects not working entirely.

ValPKFX commented 2 years ago

Thank you for the report, this is now fixed on the development branch in the commit fd201df2f9cb64aa9e43023d196a53eb7b6b2030.

In fact the product was not null, but the path returned by AssetBrowserEntry::GetFullPath() changed in the commit o3de/o3de@cfa615a8faea088ab2fe01b3d9fe011f7db1612. Before, when called on a product, it was returning the source absolute path and now it returns the absolute path of the product in the cache folder. But it's not an issue, we are now using an another way to get the asset full path.

It seems there is still some shaders not compiling on the development branch. I will close this issue and look at it.