-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1e126a5
Showing
79 changed files
with
1,342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Visual Studio 2015 user specific files | ||
.vs/ | ||
.idea/ | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.ipa | ||
|
||
# These project files can be generated by the engine | ||
*.xcodeproj | ||
*.xcworkspace | ||
*.sln | ||
*.suo | ||
*.opensdf | ||
*.sdf | ||
*.VC.db | ||
*.VC.opendb | ||
|
||
# Precompiled Assets | ||
SourceArt/**/*.png | ||
SourceArt/**/*.tga | ||
|
||
# Binary Files | ||
Binaries/* | ||
Plugins/*/Binaries/* | ||
|
||
# Builds | ||
Build/* | ||
|
||
# Whitelist PakBlacklist-<BuildConfiguration>.txt files | ||
!Build/*/ | ||
Build/*/** | ||
!Build/*/PakBlacklist*.txt | ||
|
||
# Don't ignore icon files in Build | ||
!Build/**/*.ico | ||
|
||
# Built data for maps | ||
*_BuiltData.uasset | ||
|
||
# Configuration files generated by the Editor | ||
Saved/* | ||
|
||
# Compiled source files for the engine to use | ||
Intermediate/* | ||
Plugins/*/Intermediate/* | ||
|
||
# Cache files for the editor to use | ||
DerivedDataCache/* | ||
*.user |
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
|
||
[/Script/EngineSettings.GameMapsSettings] | ||
GameDefaultMap=/Game/Maps/L_NiagaraDemo.L_NiagaraDemo | ||
|
||
|
||
EditorStartupMap=/Game/Maps/L_NiagaraDemo.L_NiagaraDemo | ||
|
||
[/Script/HardwareTargeting.HardwareTargetingSettings] | ||
TargetedHardwareClass=Desktop | ||
AppliedTargetedHardwareClass=Desktop | ||
DefaultGraphicsPerformance=Maximum | ||
AppliedDefaultGraphicsPerformance=Maximum | ||
|
||
[/Script/Engine.Engine] | ||
+ActiveGameNameRedirects=(OldGameName="TP_BlankBP",NewGameName="/Script/NiagaraUI") | ||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_BlankBP",NewGameName="/Script/NiagaraUI") | ||
|
||
[/Script/Engine.UserInterfaceSettings] | ||
RenderFocusRule=NavigationOnly | ||
HardwareCursors=() | ||
SoftwareCursors=((Default, /Game/Blueprints/Widgets/WB_Cursor.WB_Cursor_C)) | ||
ApplicationScale=1.000000 | ||
UIScaleRule=ShortestSide | ||
CustomScalingRuleClass=None | ||
UIScaleCurve=(EditorCurveData=(Keys=((Time=480.000000,Value=0.444000),(Time=720.000000,Value=0.666000),(Time=1080.000000,Value=1.000000),(Time=8640.000000,Value=8.000000)),DefaultValue=340282346638528859811704183484516925440.000000,PreInfinityExtrap=RCCE_Constant,PostInfinityExtrap=RCCE_Constant),ExternalCurve=None) | ||
bAllowHighDPIInGameMode=False | ||
DesignScreenSize=(X=1920,Y=1080) | ||
bLoadWidgetsOnDedicatedServer=True | ||
|
||
[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] | ||
bPackageDataInsideApk=True | ||
|
||
[/Script/LuminRuntimeSettings.LuminRuntimeSettings] | ||
IconModelPath=(Path="") | ||
IconPortalPath=(Path="") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
|
||
[/Script/EngineSettings.GeneralProjectSettings] | ||
ProjectID=1471BD1F4F0189ED70E3EBA73914E154 | ||
CopyrightNotice="Copyright (c) 2021 Michal Smoleň " | ||
LicensingTerms=MIT License | ||
ProjectName=Niagara UI Demo | ||
Description=Demo project for the Niagara UI Plugin | ||
|
||
[StartupActions] | ||
bAddPacks=True | ||
InsertPack=(PackSource="StarterContent.upack",PackName="StarterContent") | ||
|
||
[/Script/UnrealEd.ProjectPackagingSettings] | ||
bSkipEditorContent=True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
[/Script/Engine.InputSettings] | ||
DefaultViewportMouseLockMode=LockAlways | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Michal Smoleň | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | ||
OR OTHER DEALINGS IN THE SOFTWARE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"FileVersion": 3, | ||
"EngineAssociation": "4.26", | ||
"Category": "", | ||
"Description": "", | ||
"Modules": [ | ||
{ | ||
"Name": "NiagaraUI", | ||
"Type": "Runtime", | ||
"LoadingPhase": "Default", | ||
"AdditionalDependencies": [ | ||
"Engine" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[FilterPlugin] | ||
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and | ||
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. | ||
; | ||
; Examples: | ||
; /README.txt | ||
; /Extras/... | ||
; /Binaries/ThirdParty/*.dll |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions
55
Plugins/NiagaraUIRenderer/Source/NiagaraUIRenderer/NiagaraUIRenderer.Build.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
using UnrealBuildTool; | ||
|
||
public class NiagaraUIRenderer : ModuleRules | ||
{ | ||
public NiagaraUIRenderer(ReadOnlyTargetRules Target) : base(Target) | ||
{ | ||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; | ||
|
||
PublicIncludePaths.AddRange( | ||
new string[] { | ||
// ... add public include paths required here ... | ||
} | ||
); | ||
|
||
|
||
PrivateIncludePaths.AddRange( | ||
new string[] { | ||
// ... add other private include paths required here ... | ||
} | ||
); | ||
|
||
|
||
PublicDependencyModuleNames.AddRange( | ||
new string[] | ||
{ | ||
"Core", | ||
"UMG", | ||
// ... add other public dependencies that you statically link with here ... | ||
} | ||
); | ||
|
||
|
||
PrivateDependencyModuleNames.AddRange( | ||
new string[] | ||
{ | ||
"CoreUObject", | ||
"Engine", | ||
"Slate", | ||
"SlateCore", | ||
"Niagara", | ||
// ... add private dependencies that you statically link with here ... | ||
} | ||
); | ||
|
||
|
||
DynamicallyLoadedModuleNames.AddRange( | ||
new string[] | ||
{ | ||
// ... add any modules that your module loads dynamically here ... | ||
} | ||
); | ||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
Plugins/NiagaraUIRenderer/Source/NiagaraUIRenderer/Private/NiagaraSystemWidget.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
|
||
#include "NiagaraSystemWidget.h" | ||
#include "SNiagaraUISystemWidget.h" | ||
#include "Materials/MaterialInterface.h" | ||
#include "NiagaraUIActor.h" | ||
#include "NiagaraUIComponent.h" | ||
|
||
TSharedRef<SWidget> UNiagaraSystemWidget::RebuildWidget() | ||
{ | ||
niagaraSlateWidget = SNew(SNiagaraUISystemWidget); | ||
|
||
InitializeNiagaraUI(); | ||
|
||
return niagaraSlateWidget.ToSharedRef(); | ||
} | ||
|
||
void UNiagaraSystemWidget::SynchronizeProperties() | ||
{ | ||
Super::SynchronizeProperties(); | ||
|
||
if (!niagaraSlateWidget.IsValid()) | ||
{ | ||
return; | ||
} | ||
|
||
if (!NiagaraActor || !NiagaraComponent) | ||
InitializeNiagaraUI(); | ||
|
||
} | ||
|
||
void UNiagaraSystemWidget::ReleaseSlateResources(bool bReleaseChildren) | ||
{ | ||
Super::ReleaseSlateResources(bReleaseChildren); | ||
|
||
niagaraSlateWidget.Reset(); | ||
|
||
if (NiagaraActor) | ||
NiagaraActor->Destroy(); | ||
} | ||
|
||
#if WITH_EDITOR | ||
const FText UNiagaraSystemWidget::GetPaletteCategory() | ||
{ | ||
return NSLOCTEXT("NiagaraUIRenderer", "Palette Category", "Niagara"); | ||
} | ||
|
||
void UNiagaraSystemWidget::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) | ||
{ | ||
Super::PostEditChangeProperty(PropertyChangedEvent); | ||
|
||
InitializeNiagaraUI(); | ||
} | ||
#endif | ||
|
||
void UNiagaraSystemWidget::InitializeNiagaraUI() | ||
{ | ||
if (UWorld* World = GetWorld()) | ||
{ | ||
if (!World->PersistentLevel) | ||
return; | ||
|
||
|
||
if (!NiagaraActor) | ||
{ | ||
FActorSpawnParameters spawnParams; | ||
spawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; | ||
NiagaraActor = World->SpawnActor<ANiagaraUIActor>(FVector::ZeroVector, FRotator::ZeroRotator, spawnParams); | ||
} | ||
|
||
NiagaraComponent = NiagaraActor->SpawnNewNiagaraUIComponent(NiagaraSystemReference, AutoActivate, ShowDebugSystemInWorld); | ||
|
||
niagaraSlateWidget->SetNiagaraComponentReference(NiagaraComponent, FNiagaraWidgetProperties(&MaterialRemapList, AutoActivate, ShowDebugSystemInWorld, FakeDepthScale, FakeDepthScaleDistance)); | ||
} | ||
} | ||
|
||
void UNiagaraSystemWidget::ActivateSystem(bool Reset) | ||
{ | ||
if (NiagaraComponent) | ||
NiagaraComponent->Activate(Reset); | ||
} | ||
|
||
void UNiagaraSystemWidget::DeactivateSystem() | ||
{ | ||
if (NiagaraComponent) | ||
NiagaraComponent->Deactivate(); | ||
} | ||
|
||
UNiagaraUIComponent* UNiagaraSystemWidget::GetNiagaraComponent() | ||
{ | ||
return NiagaraComponent; | ||
} |
29 changes: 29 additions & 0 deletions
29
Plugins/NiagaraUIRenderer/Source/NiagaraUIRenderer/Private/NiagaraUIActor.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
|
||
#include "NiagaraUIActor.h" | ||
#include "NiagaraUIComponent.h" | ||
#include "Components/SceneComponent.h" | ||
|
||
PRAGMA_DISABLE_OPTIMIZATION | ||
|
||
ANiagaraUIActor::ANiagaraUIActor() | ||
{ | ||
if (!RootComponent) | ||
RootComponent = CreateDefaultSubobject<USceneComponent>(USceneComponent::GetDefaultSceneRootVariableName()); | ||
} | ||
|
||
UNiagaraUIComponent* ANiagaraUIActor::SpawnNewNiagaraUIComponent(UNiagaraSystem* NiagaraSystemTemplate, bool AutoActivate, bool ShowDebugSystem) | ||
{ | ||
UNiagaraUIComponent* newComponent = NewObject<UNiagaraUIComponent>(this); | ||
|
||
newComponent->SetupAttachment(RootComponent); | ||
newComponent->SetAutoActivate(AutoActivate); | ||
newComponent->SetHiddenInGame(!ShowDebugSystem); | ||
newComponent->RegisterComponent(); | ||
newComponent->SetAsset(NiagaraSystemTemplate); | ||
newComponent->SetAutoDestroy(false); | ||
|
||
return newComponent; | ||
} | ||
PRAGMA_ENABLE_OPTIMIZATION |
Oops, something went wrong.