Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kyrium
KBFL
Commits
a1f08342
Commit
a1f08342
authored
Jan 02, 2022
by
Kyrium
Browse files
Add Deinitialize on subsystems
parent
f90e6406
Changes
5
Hide whitespace changes
Inline
Side-by-side
Source/KBFL/Private/Subsystems/KBFLContentCDOHelperSubsystem.cpp
View file @
a1f08342
...
...
@@ -27,6 +27,15 @@ void UKBFLContentCDOHelperSubsystem::Initialize(FSubsystemCollectionBase& Collec
Super
::
Initialize
(
Collection
);
}
void
UKBFLContentCDOHelperSubsystem
::
Deinitialize
()
{
Initialized
=
false
;
mModulesToCall
.
Empty
();
mCDOCalled
.
Empty
();
Super
::
Deinitialize
();
}
void
UKBFLContentCDOHelperSubsystem
::
BeginCDOForModule
(
UWorldModule
*
Module
,
ELifecyclePhase
Phase
)
{
UE_LOG
(
ContentCDOHelperSubsystem
,
Log
,
TEXT
(
"BeginCDOForModule > %s"
),
*
Module
->
GetName
());
...
...
Source/KBFL/Private/Subsystems/KBFLCustomizerSubsystem.cpp
View file @
a1f08342
...
...
@@ -28,8 +28,6 @@ void UKBFLCustomizerSubsystem::Initialize(FSubsystemCollectionBase& Collection)
void
UKBFLCustomizerSubsystem
::
Deinitialize
()
{
Super
::
Deinitialize
();
if
(
mDefaultSwatchCollection
)
for
(
auto
SwatchMap
:
mSwatchIDMap
)
{
...
...
@@ -38,6 +36,13 @@ void UKBFLCustomizerSubsystem::Deinitialize()
if
(
Default
->
mCustomizations
.
Contains
(
SwatchMap
.
Value
))
Default
->
mCustomizations
.
Remove
(
SwatchMap
.
Value
);
}
mCalled
.
Empty
();
mSwatchIDMap
.
Empty
();
Initialized
=
false
;
Gathered
=
false
;
Super
::
Deinitialize
();
}
void
UKBFLCustomizerSubsystem
::
OnActorsInitialized
(
const
UWorld
::
FActorsInitializedParams
&
)
...
...
Source/KBFL/Private/Subsystems/KBFLResourceNodeSubsystem.cpp
View file @
a1f08342
...
...
@@ -33,6 +33,15 @@ void UKBFLResourceNodeSubsystem::Initialize(FSubsystemCollectionBase& Collection
Super
::
Initialize
(
Collection
);
}
void
UKBFLResourceNodeSubsystem
::
Deinitialize
()
{
mCalledModules
.
Empty
();
mResourceNodeInformations
.
Empty
();
Initialized
=
false
;
Super
::
Deinitialize
();
}
void
UKBFLResourceNodeSubsystem
::
OnWorldBeginPlay
()
{
if
(
!
Initialized
)
...
...
Source/KBFL/Public/Subsystems/KBFLContentCDOHelperSubsystem.h
View file @
a1f08342
...
...
@@ -21,6 +21,7 @@ class KBFL_API UKBFLContentCDOHelperSubsystem : public UWorldSubsystem
/** Implement this for initialization of instances of the system */
virtual
void
Initialize
(
FSubsystemCollectionBase
&
Collection
)
override
;
virtual
void
Deinitialize
()
override
;
public:
void
OnWorldBeginPlay
();
...
...
Source/KBFL/Public/Subsystems/KBFLResourceNodeSubsystem.h
View file @
a1f08342
...
...
@@ -33,6 +33,7 @@ class KBFL_API UKBFLResourceNodeSubsystem : public UWorldSubsystem
/** Implement this for initialization of instances of the system */
virtual
void
Initialize
(
FSubsystemCollectionBase
&
Collection
)
override
;
virtual
void
Deinitialize
()
override
;
public:
void
OnWorldBeginPlay
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment