DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
SaveLevel.h
1// Copyright 2022 Thomas Arinesalingam, John Ole Bjerke, Endre Heksum & Henrik Markengbakken Karlsen . All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/SaveGame.h"
7#include "Kismet/GameplayStatics.h"
8
9#include "SaveLevel.generated.h" // Last Include
10
14USTRUCT()
16{
17 GENERATED_BODY()
18
19public:
20 /* Identifier for which Actor this belongs to */
21 UPROPERTY()
22 FName Name;
23
24 /* Class of the Actor */
25 UPROPERTY()
26 UClass* Class = nullptr;;
27
28 /* For movable Actors, keep location,rotation,scale. */
29 UPROPERTY()
30 FTransform Transform;
31
32 /* Contains all 'SaveGame' marked variables of the Actor */
33 UPROPERTY()
34 TArray<uint8> ByteData;
35};
36
40UCLASS()
41class DESKSIMV2_API USaveLevel : public USaveGame
42{
43 GENERATED_BODY()
44
45public:
46 // Default Values
47 UPROPERTY(VisibleAnywhere, Category = Basic)
48 uint32 UserIndex;
49
50 UPROPERTY(VisibleAnywhere, Category = Basic)
51 FString SaveSlotName;
52
53 UPROPERTY()
54 TArray<FActorData> SavedActors;
55
56
57
58 USaveLevel();
59};
Handles what data is saved in the .sav files.
Definition: SaveLevel.h:42
Struct holding all Data needed from an Actor.
Definition: SaveLevel.h:16