Skip to content

Commit

Permalink
PopcornFX Plugin v2.15.15
Browse files Browse the repository at this point in the history
  • Loading branch information
PopcornFX Bot committed Oct 26, 2023
1 parent 9efadda commit f4a83d9
Show file tree
Hide file tree
Showing 47 changed files with 451 additions and 224 deletions.
2 changes: 1 addition & 1 deletion Download_SDK_Desktop.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.15.14_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.18.1_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z"
bitsadmin /setpriority third_party_download_desktop "FOREGROUND"
bitsadmin /resume third_party_download_desktop

Expand Down
2 changes: 1 addition & 1 deletion Download_SDK_Mobile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.15.14_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z"
bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.18.1_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z"
bitsadmin /setpriority third_party_download_mobile "FOREGROUND"
bitsadmin /resume third_party_download_mobile

Expand Down
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": 21514,
"VersionName": "2.15.14",
"Version": 21801,
"VersionName": "2.18.1",
"FriendlyName": "PopcornFX",
"Description": "PopcornFX Realtime Particle Solution integration into Unreal Engine",
"Category": "PopcornFX",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Unreal Engine PopcornFX Plugin

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

[Contact-us](http://www.popcornfx.com/contact-us/) to request access to the plugin for consoles.
Expand Down
23 changes: 18 additions & 5 deletions Shaders/Private/PopcornFXVertexFactory.ush
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In
Intermediates.SceneData = VF_GPUSCENE_GET_INTERMEDIATES(Input);
#endif // (ENGINE_MAJOR_VERSION == 5)

uint vertexID = Input.VertexId;
uint particleID = 0;
uint particleID = 0;
const int vertexID = Input.VertexId;
const int vpp = PopcornFXBillboardVSUniforms.VPP; // Note: if tube/multiplane with differing vertex count end up being batched, this won't work.
const int vppHalf = vpp / 2 - 1;
switch (PopcornFXBillboardVSUniforms.RendererType)
{
case Renderer_Billboard:
Expand All @@ -279,9 +281,20 @@ FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In
}
case Renderer_Ribbon:
{
// First two vertices within a quad: grab the current particle, last two: grab the next one
// Clamps to the total particle count to avoid overflowing the GPU sim buffers
particleID = min(vertexID / 4 + saturate((int)vertexID % 4 - 1), PopcornFXBillboardVSUniforms.TotalParticleCount - 1);
if (vertexID < PopcornFXBillboardVSUniforms.TubesPlanesOffset * 4) // No tube/multiplane batching yet with quad bb modes, but this might come.
{
// First two vertices within a quad: grab the current particle, last two: grab the next one
// Clamps to the total particle count to avoid overflowing the GPU sim buffers
particleID = min(vertexID / 4 + saturate(vertexID % 4 - 1), PopcornFXBillboardVSUniforms.TotalParticleCount - 1);
}
else
{
// First n (n being segmentCount/planeCount + 1) vertices: grab the current particle, last n: grab the next one
// Clamps to the total particle count to avoid overflowing the GPU sim buffers
particleID = min(PopcornFXBillboardVSUniforms.TubesPlanesOffset + (vertexID - (PopcornFXBillboardVSUniforms.TubesPlanesOffset * 4)) / vpp +
saturate(vertexID % vpp - vppHalf),
PopcornFXBillboardVSUniforms.TotalParticleCount - 1);
}
break;
}
case Renderer_Triangle:
Expand Down
1 change: 0 additions & 1 deletion Source/PopcornFX/Private/Assets/PopcornFXEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ bool UPopcornFXEffect::_BakeFile(const FString &srcFilePath, FString &outBakedFi
return false;
cookery.MapOven("pkfx", ovenIdParticle);
cookery.m_DstPackPaths.PushBack(defaultTarget);
cookery.m_PreferredSimLocation = PopcornFX::SSimDispatchHint::Location_CPU; // Only compile gpu sim bytecodes for layers set to run on GPU
cookery.AddOvenFlags(PopcornFX::COven::Flags_BakeMemoryVersion);

if (!forEditor)
Expand Down
4 changes: 2 additions & 2 deletions Source/PopcornFX/Private/Assets/PopcornFXFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#include "UObject/LinkerLoad.h"
#if WITH_EDITOR
# include "Factories/TextureFactory.h"
# if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# if (ENGINE_MAJOR_VERSION == 5)
# include "AssetRegistry/AssetRegistryModule.h"
# else
# include "AssetRegistryModule.h"
# endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
# endif // (ENGINE_MAJOR_VERSION == 5)
# include "EditorReimportHandler.h"
#endif // WITH_EDITOR

Expand Down
6 changes: 3 additions & 3 deletions Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "Engine/Texture2D.h"
#include "Engine/StaticMesh.h"
#include "Engine/SkeletalMesh.h"
#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
# include "Engine/SkinnedAssetCommon.h"
#endif
#include "MaterialShared.h"
Expand Down Expand Up @@ -90,15 +90,15 @@ namespace
for (int32 i = 0; i < params.StaticSwitchParameters.Num(); ++i)
{
FStaticSwitchParameter &param = params.StaticSwitchParameters[i];
#elif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION == 1)
#elif (ENGINE_MAJOR_VERSION == 5)
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)
#endif

if (param.ParameterInfo.Name == name)
{
Expand Down
19 changes: 10 additions & 9 deletions Source/PopcornFX/Private/Attributes/PopcornFXAttributeList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ DEFINE_LOG_CATEGORY_STATIC(LogPopcornFXAttributeList, Log, All);
#if WITH_EDITOR
template float UPopcornFXAttributeList::GetAttributeDim<float>(uint32, uint32);
template int32 UPopcornFXAttributeList::GetAttributeDim<int32>(uint32, uint32);
template void UPopcornFXAttributeList::SetAttributeDim<float>(uint32, uint32, float);
template void UPopcornFXAttributeList::SetAttributeDim<int32>(uint32, uint32, int32);
template void UPopcornFXAttributeList::SetAttributeDim<float>(uint32, uint32, float, bool);
template void UPopcornFXAttributeList::SetAttributeDim<int32>(uint32, uint32, int32, bool);
#endif // WITH_EDITOR

//----------------------------------------------------------------------------
Expand Down Expand Up @@ -1141,11 +1141,12 @@ void UPopcornFXAttributeList::GetAttribute(uint32 attributeId, FPopcornFXAttribu

//----------------------------------------------------------------------------

void UPopcornFXAttributeList::SetAttribute(uint32 attributeId, const FPopcornFXAttributeValue &value)
void UPopcornFXAttributeList::SetAttribute(uint32 attributeId, const FPopcornFXAttributeValue &value, bool fromUI/* = false*/)
{
#if WITH_EDITOR
if (!PK_VERIFY(attributeId < (u32)m_Attributes.Num()))
return;
m_RestartEmitter |= fromUI && FPopcornFXPlugin::Get().SettingsEditor()->bRestartEmitterWhenAttributesChanged;
#else
check(attributeId < (u32)m_Attributes.Num());
#endif
Expand Down Expand Up @@ -1221,7 +1222,7 @@ float UPopcornFXAttributeList::GetAttributeQuaternionDim(uint32 attributeId, uin

//----------------------------------------------------------------------------

void UPopcornFXAttributeList::SetAttributeQuaternionDim(uint32 attributeId, uint32 dim, float value)
void UPopcornFXAttributeList::SetAttributeQuaternionDim(uint32 attributeId, uint32 dim, float value, bool fromUI/* = false*/)
{
#if WITH_EDITOR
if (!PK_VERIFY(attributeId < (u32)m_Attributes.Num()))
Expand All @@ -1244,13 +1245,13 @@ void UPopcornFXAttributeList::SetAttributeQuaternionDim(uint32 attributeId, uint
newValue.m_Data32f[2] = quaternion.Z;
newValue.m_Data32f[3] = quaternion.W;

SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue)); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue), fromUI); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
}

//----------------------------------------------------------------------------

template<typename _Scalar>
void UPopcornFXAttributeList::SetAttributeDim(uint32 attributeId, uint32 dim, _Scalar value)
void UPopcornFXAttributeList::SetAttributeDim(uint32 attributeId, uint32 dim, _Scalar value, bool fromUI/* = false*/)
{
#if WITH_EDITOR
if (!PK_VERIFY(attributeId < (u32)m_Attributes.Num()))
Expand All @@ -1262,13 +1263,13 @@ void UPopcornFXAttributeList::SetAttributeDim(uint32 attributeId, uint32 dim, _S
PopcornFX::SAttributesContainer_SAttrib newValue = AttributeRawDataAttributes(this)[attributeId];
newValue.Get<_Scalar>()[dim] = value;

SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue)); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue), fromUI); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
}

//----------------------------------------------------------------------------

template <>
void UPopcornFXAttributeList::SetAttributeDim<bool>(uint32 attributeId, uint32 dim, bool value)
void UPopcornFXAttributeList::SetAttributeDim<bool>(uint32 attributeId, uint32 dim, bool value, bool fromUI/* = false*/)
{
#if WITH_EDITOR
if (!PK_VERIFY(attributeId < (u32)m_Attributes.Num()))
Expand All @@ -1280,7 +1281,7 @@ void UPopcornFXAttributeList::SetAttributeDim<bool>(uint32 attributeId, uint32 d
PopcornFX::SAttributesContainer_SAttrib newValue = AttributeRawDataAttributes(this)[attributeId];
reinterpret_cast<bool*>(newValue.Get<uint32>())[dim] = value;

SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue)); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
SetAttribute(attributeId, *reinterpret_cast<FPopcornFXAttributeValue*>(&newValue), fromUI); // Ugly cast, so PopcornFXAttributeList.h is a public header to satisfy UE4 nativization bugs. To refactor some day
}

#endif // WITH_EDITOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,11 @@ namespace
{
const TArray<int32> &GetMasterBoneMap(const USkinnedMeshComponent *skinnedMesh)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
return skinnedMesh->GetLeaderBoneMap();
#else
return skinnedMesh->GetMasterBoneMap();
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
}

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

Expand Down Expand Up @@ -743,19 +743,19 @@ namespace
}
}

#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
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)
#endif // (ENGINE_MAJOR_VERSION == 5)
const bool hasMasterPoseComponent = masterPoseComponent != null;
if (hasMasterPoseComponent)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
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)
#endif // (ENGINE_MAJOR_VERSION == 5)
}

PK_ONLY_IF_ASSERTS(u32 totalVertices = 0);
Expand Down Expand Up @@ -899,11 +899,11 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::BuildInitialPose()

if (buildDesc.m_LODRenderData->SkinWeightVertexBuffer.GetBoneInfluenceType() == UnlimitedBoneInfluence)
{
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
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)
#endif // (ENGINE_MAJOR_VERSION == 5)
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,31 +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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DocumentationURL())));

menuBuilder.AddMenuEntry(
LOCTEXT("WikiTitle", "Plugin Wiki"),
LOCTEXT("WikiTooltip", "Opens the PopcornFX UE plugin wiki"),
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DiscordURL())));
}
menuBuilder.EndSection();
Expand All @@ -151,11 +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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSourcePack),
FCanExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::CanOpenSourcePack)));
}
Expand All @@ -166,51 +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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
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)
#if (ENGINE_MAJOR_VERSION == 5)
FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"),
#else
FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"),
#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1)
#endif // (ENGINE_MAJOR_VERSION == 5)
FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("PopcornFX.ToggleMemoryHUD"))));

}
Expand Down
Loading

0 comments on commit f4a83d9

Please sign in to comment.