Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5 release #90

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
227c9b1
5.2 Update + SaveSlot refactor [1/X]
muit Sep 16, 2023
dbdc119
Removed presets
muit Sep 18, 2023
1690194
Refactored blueprint actions
muit Sep 20, 2023
58c5e29
Small changes to defautl settings and names
muit Sep 21, 2023
98abc63
Performance improvements & tasks refactor
muit Sep 28, 2023
565759a
Multiple fixes to filters
muit Sep 29, 2023
d2cd853
Merge branch 'feature/saveslot-refactor' of https://github.com/PipeRi…
muit Sep 29, 2023
7458d76
Added subsystem records
muit Oct 3, 2023
826b72a
Moved tasks to correct folder, removed SlotIds
muit Oct 3, 2023
dc5a439
Merge pull request #88 from PipeRift/feature/saveslot-refactor
muit Oct 3, 2023
61973b3
Merge branch 'develop' into feature/save-subsystems
muit Oct 3, 2023
06b6076
Refactor async serialization
muit Oct 3, 2023
a394234
Refactored PreloadAllSlots
muit Oct 3, 2023
3e41ae6
Refactored Deleting Slots
muit Oct 3, 2023
6651239
Save thumbnail in SaveSlot
muit Oct 4, 2023
ceea8f8
Refactor Save & Load async files
muit Oct 4, 2023
ae10031
Merge pull request #89 from PipeRift/feature/refactor-multithreading
muit Oct 4, 2023
dd3916e
Merge remote-tracking branch 'origin/develop' into feature/save-subsy…
muit Oct 4, 2023
3d54441
Save Subsystems
muit Oct 4, 2023
dbeb3d4
Ignore SKEL classes in editor for filters
muit Oct 4, 2023
74c7485
Load subsystems
muit Oct 4, 2023
235dd76
Merge pull request #91 from PipeRift/feature/save-subsystems
muit Oct 4, 2023
4d51a7c
Removed unneccesary code
muit Oct 4, 2023
3e4118b
Cleaned includes
muit Oct 5, 2023
6c9ac88
Simplified filters, fixed slot details
muit Oct 5, 2023
7c18d6a
Cleaned serialization functions
muit Oct 6, 2023
f95e5a1
Fixed level filter pin
muit Oct 6, 2023
166a480
Merge pull request #93 from PipeRift/hotfix/fix-level-filter-pin
muit Oct 6, 2023
4a9c518
Added player records and serialization
muit Oct 9, 2023
bb2a486
Merge pull request #94 from PipeRift/feature/player-serialization
muit Oct 9, 2023
73fe72e
[CICD] Preliminar build script
muit Oct 9, 2023
11a1bd8
Update build.yml
muit Oct 9, 2023
e3280ca
[CICD] Update build.yml
muit Oct 9, 2023
ed56901
Update build.yml
muit Oct 9, 2023
e3362f7
[CICD] Update build.yml
muit Oct 9, 2023
02a865a
Build fixes
muit Oct 9, 2023
13c410f
Merge branch 'develop' into feature/github-cicd
muit Oct 9, 2023
1dad616
[CICD] use Python 3
muit Oct 9, 2023
8898606
[CICD] Update build.yml
muit Oct 10, 2023
2f37f7b
Merge branch 'feature/github-cicd' into develop
muit Oct 11, 2023
685e198
Fixes for Linux builds
muit Oct 11, 2023
6de677d
Build fixes for Windows
muit Oct 11, 2023
f4c9e64
Fixed includes for Windows builds
muit Oct 11, 2023
f61aeb3
Removed unused include
muit Oct 11, 2023
12c9b1e
Added missing include
muit Oct 11, 2023
e0dbc93
Merge branch 'develop' into feature/github-cicd
muit Oct 12, 2023
5945f80
[CICD] Enable cache
muit Oct 12, 2023
e51fb79
Merge pull request #97 from PipeRift/feature/github-cicd
muit Oct 12, 2023
015f1c2
Small fix
muit Oct 17, 2023
208c325
Re-enabled events
muit Oct 31, 2023
af71e19
Fixed incorrect UPARAM and re-enabled events
muit Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplified filters, fixed slot details
muit committed Oct 5, 2023
commit 6c9ac88e980c7334bae3552cf99556fea3620021
66 changes: 31 additions & 35 deletions Source/Editor/Private/Customizations/SaveSlotDetails.cpp
Original file line number Diff line number Diff line change
@@ -28,37 +28,42 @@ void FSaveSlotDetails::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
TArray<TWeakObjectPtr<UObject>> Objects;
DetailBuilder.GetObjectsBeingCustomized(Objects);

TSharedRef<IPropertyHandle> MultithreadedSerialization = DetailBuilder.GetProperty(FName("MultithreadedSerialization"), USaveSlot::StaticClass());
TSharedRef<IPropertyHandle> FrameSplittedSerialization = DetailBuilder.GetProperty(FName("FrameSplittedSerialization"), USaveSlot::StaticClass());
TSharedRef<IPropertyHandle> MaxFrameMs = DetailBuilder.GetProperty(FName("MaxFrameMs"), USaveSlot::StaticClass());

if (Objects.Num() && Objects[0] != nullptr)
{
Slot = CastChecked<USaveSlot>(Objects[0].Get());

DetailBuilder.EditCategory(TEXT("Gameplay"));
// Sort categories
DetailBuilder.EditCategory(TEXT("Slot"));
DetailBuilder.EditCategory(TEXT("Automatic"));
DetailBuilder.EditCategory(TEXT("Serialization"));

IDetailCategoryBuilder& Category = DetailBuilder.EditCategory(TEXT("Asynchronous"));
{
Category.AddProperty(TEXT("MultithreadedSerialization"));
Category.AddProperty(TEXT("FrameSplittedSerialization"));
Category.AddCustomRow(LOCTEXT("AsyncWarning", "Asynchronous Warning"))
.Visibility({this, &FSaveSlotDetails::GetWarningVisibility})
.ValueContent()
.MinDesiredWidth(300.f)
.MaxDesiredWidth(
400.f)[SNew(SBorder)
.Padding(2.f)
.BorderImage(FAppStyle::GetBrush("ErrorReporting.EmptyBox"))
.BorderBackgroundColor(this, &FSaveSlotDetails::GetWarningColor)
[SNew(STextBlock)
.Text(LOCTEXT("AsyncWarningText",
"WARNING: Frame-splitted loading or saving is not recommended "
"while using Level Streaming or World Composition"))
.AutoWrapText(true)]];

Category.AddProperty(TEXT("MaxFrameMs"))
.EditCondition({this, &FSaveSlotDetails::CanEditAsynchronous}, nullptr);
}

DetailBuilder.EditCategory(TEXT("Level Streaming"));
DetailBuilder.EditCategory(TEXT("Files"));
DetailBuilder.EditCategory(TEXT("Async"));

DetailBuilder.AddPropertyToCategory(MultithreadedSerialization);
DetailBuilder.AddPropertyToCategory(FrameSplittedSerialization);
DetailBuilder.AddCustomRowToCategory(FrameSplittedSerialization, LOCTEXT("AsyncWarning", "Asynchronous Warning"))
.Visibility({this, &FSaveSlotDetails::GetWarningVisibility})
.ValueContent()
.MinDesiredWidth(300.f)
.MaxDesiredWidth(400.f)
[
SNew(SBorder)
.Padding(2.f)
.BorderImage(FAppStyle::GetBrush("ErrorReporting.EmptyBox"))
.BorderBackgroundColor(this, &FSaveSlotDetails::GetWarningColor)
[
SNew(STextBlock)
.Text(LOCTEXT("AsyncWarningText",
"WARNING: Frame-splitted loading or saving is not recommended "
"while using Level Streaming or World Composition"))
.AutoWrapText(true)
]
];
DetailBuilder.AddPropertyToCategory(MaxFrameMs);
}
}

@@ -77,13 +82,4 @@ EVisibility FSaveSlotDetails::GetWarningVisibility() const
return EVisibility::Collapsed;
}

bool FSaveSlotDetails::CanEditAsynchronous() const
{
if (Slot.IsValid())
{
return Slot->GetFrameSplitSerialization() != ESEAsyncMode::SaveAndLoadSync;
}
return true;
}

#undef LOCTEXT_NAMESPACE
2 changes: 0 additions & 2 deletions Source/Editor/Private/Customizations/SaveSlotDetails.h
Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@ class FSaveSlotDetails : public IDetailCustomization

FSlateColor GetWarningColor() const;
EVisibility GetWarningVisibility() const;
bool CanEditAsynchronous() const;


TWeakObjectPtr<USaveSlot> Slot;
};
4 changes: 0 additions & 4 deletions Source/Editor/Private/SaveExtensionEditor.cpp
Original file line number Diff line number Diff line change
@@ -46,10 +46,6 @@ void FSaveExtensionEditor::RegisterPropertyTypeCustomizations()

RegisterCustomPropertyTypeLayout("SEClassFilter",
FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FSEClassFilterCustomization::MakeInstance));
RegisterCustomPropertyTypeLayout("SEActorClassFilter",
FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FSEClassFilterCustomization::MakeInstance));
RegisterCustomPropertyTypeLayout("SEComponentClassFilter",
FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FSEClassFilterCustomization::MakeInstance));

RegisterCustomPinFactory<FSEClassFilterGraphPanelPinFactory>();
}
2 changes: 1 addition & 1 deletion Source/SaveExtension/Private/Serialization/SEArchive.cpp
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ FArchive& FSEArchive::operator<<(UObject*& Obj)
}
else
{
if (Obj && !Obj->IsTemplate() && !Obj->HasAnyFlags(RF_Transient))
if (Obj)
{
// Serialize the fully qualified object name
FString SavedString{Obj->GetPathName()};
20 changes: 0 additions & 20 deletions Source/SaveExtension/Public/ClassFilter.h
Original file line number Diff line number Diff line change
@@ -64,23 +64,3 @@ struct SAVEEXTENSION_API FSEClassFilter

bool operator==(const FSEClassFilter& Other) const;
};


USTRUCT(BlueprintType)
struct FSEActorClassFilter : public FSEClassFilter
{
GENERATED_BODY()

FSEActorClassFilter() : Super(AActor::StaticClass()) {}
FSEActorClassFilter(TSubclassOf<AActor> ActorClass) : Super(ActorClass) {}
};


USTRUCT(BlueprintType)
struct FSEComponentClassFilter : public FSEClassFilter
{
GENERATED_BODY()

FSEComponentClassFilter() : Super(UActorComponent::StaticClass()) {}
FSEComponentClassFilter(TSubclassOf<UActorComponent> CompClass) : Super(CompClass) {}
};
4 changes: 2 additions & 2 deletions Source/SaveExtension/Public/LevelFilter.h
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@ struct FSELevelFilter

public:
UPROPERTY(SaveGame)
FSEActorClassFilter ActorFilter;
FSEClassFilter ActorFilter;

UPROPERTY(SaveGame)
FSEComponentClassFilter ComponentFilter;
FSEClassFilter ComponentFilter;


FSELevelFilter() = default;
55 changes: 28 additions & 27 deletions Source/SaveExtension/Public/SaveSlot.h
Original file line number Diff line number Diff line change
@@ -65,60 +65,60 @@ class SAVEEXTENSION_API USaveSlot : public USaveGame
public:
/** Begin Settings */

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Slot")
TSubclassOf<USaveSlotData> DataClass = USaveSlotData::StaticClass();

/** If checked, will attempt to Save Game to first Slot found, timed event. */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings")
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Automatic")
bool bPeriodicSave = false;

/** Interval in seconds for auto saving */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings",
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Automatic",
meta = (EditCondition = "bPeriodicSave", UIMin = "15", UIMax = "3600"))
int32 PeriodicSaveInterval = 120.f;

/** If checked, will attempt to Save Game to current Slot found, timed event. */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings")
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Automatic")
bool bSaveOnClose = false;

/** If checked, will attempt to Load Game from last Slot found, when game starts */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings")
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Automatic")
bool bLoadOnStart = false;

/** If true save files will be compressed
* Performance: Can add from 10ms to 20ms to loading and saving (estimate) but reduce file sizes making
* them up to 30x smaller
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings|Serialization")
bool bUseCompression = true;

/** If true will store the game instance */
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = Serialization)
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Serialization")
bool bStoreGameInstance = true;

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings|Serialization")
FSEActorClassFilter ActorFilter;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Serialization")
FSEClassFilter ActorFilter{ AActor::StaticClass() };

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings|Serialization")
FSEComponentClassFilter ComponentFilter;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Serialization")
FSEClassFilter ComponentFilter{ UActorComponent::StaticClass() };

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Settings|Serialization")
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Serialization")
FSEClassFilter SubsystemFilter{ USubsystem::StaticClass() };

/** If true, will Save and Load levels when they are shown or hidden.
/** If true, will save and load sub-levels when they are shown or hidden.
* This includes level streaming and world composition.
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings|Level Streaming")
bool bSaveAndLoadSublevels = true;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Serialization")
bool bStoreSublevels = true;

/** If true save files will be compressed
* Performance: Can add from 10ms to 20ms to loading and saving (estimate) but reduce file sizes making
* them up to 30x smaller
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Files")
bool bUseCompression = true;

/** Serialization will be multi-threaded between all available cores. */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings|Async")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Async")
ESEAsyncMode MultithreadedSerialization = ESEAsyncMode::SaveAndLoadSync;

/** Split serialization between multiple frames. Ignored if MultithreadedSerialization is used
* Currently only implemented on Loading
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings|Async")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Async")
ESEAsyncMode FrameSplittedSerialization = ESEAsyncMode::SaveAndLoadSync;

/** Max milliseconds to use every frame in an asynchronous operation.
@@ -127,25 +127,26 @@ class SAVEEXTENSION_API USaveSlot : public USaveGame
* This means gameplay will not be stopped nor have frame drops while saving or loading. Works best for
* non multi-threaded platforms
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings|Async", meta = (UIMin = "3", UIMax = "10"))
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Async",
meta = (UIMin = "3", UIMax = "10", EditCondition="FrameSplittedSerialization != ESEAsyncMode::SaveAndLoadSync"))
float MaxFrameMs = 5.f;

/** Files will be loaded or saved on a secondary thread while game continues */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings|Async")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Async")
ESEAsyncMode MultithreadedFiles = ESEAsyncMode::SaveAndLoadAsync;

/**
* If checked, will print messages to Log, and Viewport if DebugInScreen is enabled.
* Ignored in package or Shipping mode.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings|Debug", AdvancedDisplay)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Debug", AdvancedDisplay)
bool bDebug = false;

/**
* If checked and Debug is enabled, will print messages to Viewport.
* Ignored in package or Shipping mode.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings|Debug", AdvancedDisplay,
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Debug", AdvancedDisplay,
meta = (EditCondition = "bDebug"))
bool bDebugInScreen = true;