Skip to content

Commit

Permalink
Showing 40 changed files with 375 additions and 129 deletions.
2 changes: 1 addition & 1 deletion Download_SDK_Desktop.bat
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ setlocal

bitsadmin /reset
bitsadmin /create third_party_download_desktop
bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.14.1_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z"
bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.14.2_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z"
bitsadmin /setpriority third_party_download_desktop "FOREGROUND"
bitsadmin /resume third_party_download_desktop

2 changes: 1 addition & 1 deletion Download_SDK_Mobile.bat
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ setlocal

bitsadmin /reset
bitsadmin /create third_party_download_mobile
bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.14.1_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z"
bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.14.2_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z"
bitsadmin /setpriority third_party_download_mobile "FOREGROUND"
bitsadmin /resume third_party_download_mobile

4 changes: 2 additions & 2 deletions PopcornFX.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 21401,
"VersionName": "2.14.1",
"Version": 21402,
"VersionName": "2.14.2",
"FriendlyName": "PopcornFX",
"Description": "PopcornFX Realtime Particle Solution integration into Unreal Engine",
"Category": "PopcornFX",
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unreal Engine PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **Unreal Engine 4** and **Unreal Engine 5** as a Plugin.
* **Version:** `v2.14.1`
* **Version:** `v2.14.2`
* **Unreal Engine:** `4.27` and `5.0`
* **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`, `PS4`, `PS5`, `XboxOne`, `Xbox Series`, `Switch`

4 changes: 4 additions & 0 deletions Source/PopcornFX/PopcornFX.Build.cs
Original file line number Diff line number Diff line change
@@ -553,7 +553,11 @@ private bool SetupPlugin(TargetInfo Target)
}
);

#if !UE_5_1_OR_LATER
bool compileWithPhysX = Target.bCompilePhysX;
#else
bool compileWithPhysX = false;
#endif // !UE_5_1_OR_LATER
#if !UE_5_0_OR_LATER // Support dropped with UE5
if (Target.Platform == UnrealTargetPlatform.Lumin)
compileWithPhysX = false;
11 changes: 10 additions & 1 deletion Source/PopcornFX/Private/Assets/PopcornFXAssetDep.cpp
Original file line number Diff line number Diff line change
@@ -21,7 +21,11 @@
#include "Engine/SkeletalMesh.h"
#include "VectorField/VectorFieldStatic.h"
#if WITH_EDITOR
# include "AssetRegistryModule.h"
# if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# include "AssetRegistry/AssetRegistryModule.h"
# else
# include "AssetRegistryModule.h"
# endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# include "Editor/EditorHelpers.h"
#endif // WITH_EDITOR

@@ -468,7 +472,12 @@ bool UPopcornFXAssetDep::Conflicts(const FString &importPath, EPopcornFXAssetDep
return false;

FAssetRegistryModule& AssetRegistryModule = FModuleManager::Get().LoadModuleChecked<FAssetRegistryModule>(TEXT("AssetRegistry"));
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSoftObjectPath objectPath(gamePath);
FAssetData assetData = AssetRegistryModule.Get().GetAssetByObjectPath(objectPath);
#else
FAssetData assetData = AssetRegistryModule.Get().GetAssetByObjectPath(*gamePath);
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
if (assetData.IsValid())
{
// Retro compat for UPopcornFXFile atlases
6 changes: 5 additions & 1 deletion Source/PopcornFX/Private/Assets/PopcornFXFile.cpp
Original file line number Diff line number Diff line change
@@ -17,7 +17,11 @@
#include "UObject/LinkerLoad.h"
#if WITH_EDITOR
# include "Factories/TextureFactory.h"
# include "AssetRegistryModule.h"
# if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# include "AssetRegistry/AssetRegistryModule.h"
# else
# include "AssetRegistryModule.h"
# endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# include "EditorReimportHandler.h"
#endif // WITH_EDITOR

10 changes: 10 additions & 0 deletions Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp
Original file line number Diff line number Diff line change
@@ -82,9 +82,15 @@ namespace

void _SetStaticSwitch(FStaticParameterSet &params, FName name, bool value)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
for (int32 i = 0; i < params.EditorOnly.StaticSwitchParameters.Num(); ++i)
{
FStaticSwitchParameter &param = params.EditorOnly.StaticSwitchParameters[i];
#else
for (int32 i = 0; i < params.StaticSwitchParameters.Num(); ++i)
{
FStaticSwitchParameter &param = params.StaticSwitchParameters[i];
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)

if (param.ParameterInfo.Name == name)
{
@@ -94,7 +100,11 @@ namespace
return;
}
}
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
new (params.EditorOnly.StaticSwitchParameters) FStaticSwitchParameter(name, value, true, FGuid()); // FGuid ???
#else
new (params.StaticSwitchParameters) FStaticSwitchParameter(name, value, true, FGuid()); // FGuid ???
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
}

void _SetStaticSwitches_Common(UMaterialInstanceConstant *material, FPopcornFXSubRendererMaterial &mat)
Original file line number Diff line number Diff line change
@@ -625,7 +625,11 @@ namespace
{
const TArray<int32> &GetMasterBoneMap(const USkinnedMeshComponent *skinnedMesh)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
return skinnedMesh->GetLeaderBoneMap();
#else
return skinnedMesh->GetMasterBoneMap();
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
}

const TArray<FSkelMeshRenderSection> &GetSections(const FSkeletalMeshLODRenderData *lodRenderData)
@@ -668,7 +672,11 @@ namespace
m_SkinnedMeshComponent = skinnedMesh;
if (m_SkinnedMeshComponent == null)
return false;
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
m_SkeletalMesh = Cast<USkeletalMesh>(m_SkinnedMeshComponent->GetSkinnedAsset());
#else
m_SkeletalMesh = m_SkinnedMeshComponent->SkeletalMesh;
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
if (m_SkeletalMesh == null)
return false;

@@ -735,10 +743,20 @@ namespace
}
}

#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const USkinnedMeshComponent *masterPoseComponent = buildDesc.m_SkinnedMeshComponent->LeaderPoseComponent.Get();
#else
const USkinnedMeshComponent *masterPoseComponent = buildDesc.m_SkinnedMeshComponent->MasterPoseComponent.Get();
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const bool hasMasterPoseComponent = masterPoseComponent != null;
if (hasMasterPoseComponent)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
PK_ASSERT(GetMasterBoneMap(buildDesc.m_SkinnedMeshComponent).Num() == SkeletalMeshRefSkeleton(Cast<USkeletalMesh>(buildDesc.m_SkinnedMeshComponent->GetSkinnedAsset())).GetNum());
#else
PK_ASSERT(GetMasterBoneMap(buildDesc.m_SkinnedMeshComponent).Num() == SkeletalMeshRefSkeleton(buildDesc.m_SkinnedMeshComponent->SkeletalMesh).GetNum());
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
}

PK_ONLY_IF_ASSERTS(u32 totalVertices = 0);

@@ -881,7 +899,11 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::BuildInitialPose()

if (buildDesc.m_LODRenderData->SkinWeightVertexBuffer.GetBoneInfluenceType() == UnlimitedBoneInfluence)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: Unlimited bone influences not supported for sampling"), *buildDesc.m_SkinnedMeshComponent->GetSkinnedAsset()->GetName());
#else
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: Unlimited bone influences not supported for sampling"), *buildDesc.m_SkinnedMeshComponent->SkeletalMesh->GetName());
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
return false;
}

@@ -894,7 +916,11 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::BuildInitialPose()
meshRes->BatchList().Count() != 1 ||
meshRes->BatchList().First() == null)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: PopcornFX mesh was not built"), *buildDesc.m_SkinnedMeshComponent->GetSkinnedAsset()->GetName());
#else
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: PopcornFX mesh was not built"), *buildDesc.m_SkinnedMeshComponent->SkeletalMesh->GetName());
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
return false;
}

@@ -963,7 +989,11 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::BuildInitialPose()

// No need to create bone weights/indices if we don't skin anything..
const u32 sectionCount = GetSections(buildDesc.m_LODRenderData).Num();
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const bool hasMasterPoseComponent = buildDesc.m_SkinnedMeshComponent->LeaderPoseComponent.Get() != null;
#else
const bool hasMasterPoseComponent = buildDesc.m_SkinnedMeshComponent->MasterPoseComponent.Get() != null;
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
if (skin && hasMasterPoseComponent) // No master pose component? Use directly the src mesh indices
{
PK_NAMEDSCOPEDPROFILE_C("AttributeSamplerSkinnedMesh::Alloc skinning buffers", POPCORNFX_UE_PROFILER_COLOR);
@@ -1083,17 +1113,33 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::UpdateSkinning()
if (!PK_VERIFY(boneCount > 0))
return false;
const FVector3f invScale(FPopcornFXPlugin::GlobalScaleRcp());


#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const USkinnedMeshComponent *baseComponent = skinnedMesh->LeaderPoseComponent.IsValid() ? skinnedMesh->LeaderPoseComponent.Get() : skinnedMesh;
#else
const USkinnedMeshComponent *baseComponent = skinnedMesh->MasterPoseComponent.IsValid() ? skinnedMesh->MasterPoseComponent.Get() : skinnedMesh;
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
if (!PK_VERIFY(boneCount <= (u32)GetComponentSpaceTransforms(baseComponent).Num()) || // <= boneCount will be greater if virtual bones are present in the skeleton
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
!PK_VERIFY(boneCount == SkeletalMeshRefBasesInvMatrices(Cast<USkeletalMesh>(skinnedMesh->GetSkinnedAsset())).Num()))
#else
!PK_VERIFY(boneCount == SkeletalMeshRefBasesInvMatrices(skinnedMesh->SkeletalMesh).Num()))
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Mismatching bone counts: make sure to rebuild bind pose for asset '%s'"), *skinnedMesh->GetSkinnedAsset()->GetName());
#else
UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Mismatching bone counts: make sure to rebuild bind pose for asset '%s'"), *skinnedMesh->SkeletalMesh->GetName());
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
return false;
}

const TArray<uint8> &boneVisibilityStates = skinnedMesh->GetBoneVisibilityStates();
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const USkeletalMesh *mesh = Cast<USkeletalMesh>(skinnedMesh->GetSkinnedAsset());
#else
const USkeletalMesh *mesh = skinnedMesh->SkeletalMesh;
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
const TArray<FTransform> &spaceBases = GetComponentSpaceTransforms(baseComponent);

const TArray<FMatrix44f> &refBasesInvMatrix= SkeletalMeshRefBasesInvMatrices(mesh);
22 changes: 11 additions & 11 deletions Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp
Original file line number Diff line number Diff line change
@@ -1992,15 +1992,15 @@ PopcornFX::CParticleSamplerDescriptor *UPopcornFXAttributeSamplerText::_AttribSa

struct FAttributeSamplerImageData
{
PopcornFX::PParticleSamplerDescriptor_Image_Default m_Desc;
PopcornFX::CImageSampler *m_ImageSampler = null;
PopcornFX::TResourcePtr<PopcornFX::CImage> m_TextureResource;
PopcornFX::PParticleSamplerDescriptor_Image_Default m_Desc;
PopcornFX::CImageSampler *m_ImageSampler = null;
PopcornFX::TResourcePtr<PopcornFX::CImage> m_TextureResource;
PopcornFX::TResourcePtr<PopcornFX::CRectangleList> m_TextureAtlasResource;
#if (PK_GPU_D3D12 != 0)
PopcornFX::TResourcePtr<PopcornFX::CImageGPU_D3D12> m_TextureResource_D3D12;
PopcornFX::TResourcePtr<PopcornFX::CImageGPU_D3D12> m_TextureResource_D3D12;
PopcornFX::TResourcePtr<PopcornFX::CRectangleListGPU_D3D12> m_TextureAtlasResource_D3D12;
#endif // (PK_GPU_D3D12 != 0)
PopcornFX::SDensitySamplerData * m_DensityData = null;
PopcornFX::SDensitySamplerData *m_DensityData = null;

bool m_ReloadTexture = true;
bool m_ReloadTextureAtlas = true;
@@ -2208,8 +2208,8 @@ bool UPopcornFXAttributeSamplerImage::_RebuildImageSampler()
if (TextureAtlas != null)
{
bool success = false;
const PopcornFX::CString fullPath = TCHAR_TO_ANSI(*TextureAtlas->GetPathName());
m_Data->m_TextureAtlasResource = PopcornFX::Resource::DefaultManager()->Load<PopcornFX::CRectangleList>(fullPath, true);
const PopcornFX::CString fullPath = TCHAR_TO_ANSI(*TextureAtlas->GetPathName());
m_Data->m_TextureAtlasResource = PopcornFX::Resource::DefaultManager()->Load<PopcornFX::CRectangleList>(fullPath, true);
success |= (m_Data->m_TextureAtlasResource != null && !m_Data->m_TextureAtlasResource->Empty());

// Try loading the image atlas with GPU sim resource handlers:
@@ -2225,7 +2225,7 @@ bool UPopcornFXAttributeSamplerImage::_RebuildImageSampler()
if (!success) // Couldn't load any of the resources (CPU/GPU)
{
UE_LOG(LogPopcornFXAttributeSampler, Warning, TEXT("AttrSamplerImage: couldn't load texture atlas '%s' for CPU/GPU sim sampling"), fullPath.Data());
return false;
return false;
}
}
else
@@ -3134,9 +3134,9 @@ bool UPopcornFXAttributeSamplerAnimTrack::RebuildCurvesIFN()
const VectorRegister arriveTangent = VectorMultiply(srcArriveTan, invScale);
const VectorRegister leaveTangent = VectorMultiply(srcLeaveTan, invScale);

VectorStore(pos, dstPos++);
VectorStore(arriveTangent, dstTangents++);
VectorStore(leaveTangent, dstTangents++);
VectorStoreFloat3(pos, dstPos++);
VectorStoreFloat3(arriveTangent, dstTangents++);
VectorStoreFloat3(leaveTangent, dstTangents++);
#endif // (ENGINE_MAJOR_VERSION == 5)
++srcPoints;
}
Original file line number Diff line number Diff line change
@@ -110,19 +110,31 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu
menuBuilder.AddMenuEntry(
LOCTEXT("DocumentationTitle", "Documentation"),
LOCTEXT("DocumentationTooltip", "Opens the PopcornFX Wiki"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DocumentationURL())));

menuBuilder.AddMenuEntry(
LOCTEXT("WikiTitle", "Plugin Wiki"),
LOCTEXT("WikiTooltip", "Opens the PopcornFX UE4 plugin wiki"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::PluginWikiURL())));

menuBuilder.AddMenuEntry(
LOCTEXT("DiscordTitle", "Discord"),
LOCTEXT("DiscordTooltip", "Join PopcornFX Discord server"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DiscordURL())));
}
menuBuilder.EndSection();
@@ -139,7 +151,11 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu
menuBuilder.AddMenuEntry(
LOCTEXT("OpenSourcePackTitle", "Open PopcornFX Editor Project"),
tooltip,
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSourcePack),
FCanExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::CanOpenSourcePack)));
}
@@ -150,31 +166,51 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu
menuBuilder.AddMenuEntry(
LOCTEXT("RuntimeSettingsTitle", "Runtime settings"),
LOCTEXT("RuntimeSettingsTooltip", "Opens the project runtime settings"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSettings, TEXT("PopcornFXSettings"))));

menuBuilder.AddMenuEntry(
LOCTEXT("EditorSettingsTitle", "Editor settings"),
LOCTEXT("EditorSettingsTooltip", "Opens the project editor settings"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSettings, TEXT("PopcornFXSettingsEditor"))));

menuBuilder.AddMenuEntry(
LOCTEXT("CmdStatPopcornFXTitle", "Cmd stat PopcornFX"),
LOCTEXT("CmdStatPopcornFXTooltip", "Runs command \"stat PopcornFX\": Toggles PopcornFX Stats display."),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("stat PopcornFX"))));

menuBuilder.AddMenuEntry(
LOCTEXT("CmdPopcornFXProfilerHUDTitle", "Cmd ToggleProfilerHUD"),
LOCTEXT("CmdPopcornFXProfilerHUDTooltip", "Runs command \"PopcornFX.ToggleProfilerHUD\": Toggles PopcornFX Profiler HUD."),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("PopcornFX.ToggleProfilerHUD"))));

menuBuilder.AddMenuEntry(
LOCTEXT("CmdPopcornFXDebugHUDTitle", "Cmd ToggleMemoryHUD"),
LOCTEXT("CmdPopcornFXDebugHUDTooltip", "Runs command \"PopcornFX.ToggleMemoryHUD\": Toggles PopcornFX Memory HUD."),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("PopcornFX.ToggleMemoryHUD"))));

}
Loading

0 comments on commit 6ac0cb7

Please sign in to comment.