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

[Feature] Basics of Save Categories #1017

Open
wants to merge 1 commit into
base: CG-Tespy-CGTFungusSaveSystem
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions Assets/Fungus/Resources/Prefabs/SaveSystem.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 123 additions & 0 deletions Assets/Fungus/Resources/Prefabs/SaveSystem/SaveCategories.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4504014508030327488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2106627647463313732}
- component: {fileID: 3238018775091389388}
- component: {fileID: 7884604544248928662}
- component: {fileID: 3195644961600647213}
- component: {fileID: 8994370576535070087}
m_Layer: 0
m_Name: SaveCategories
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2106627647463313732
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4504014508030327488}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3238018775091389388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4504014508030327488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 400
zoom: 1
scrollViewRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
selectedBlocks: []
selectedCommands: []
variables:
- {fileID: 7884604544248928662}
- {fileID: 3195644961600647213}
- {fileID: 8994370576535070087}
description: Holds various save categories the user may want to have available
for their game. Think of this as a way to have save categories as enums in Unity
without having to make them Scriptable Objects the normal way.
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
luaEnvironment: {fileID: 0}
luaBindingName: flowchart
--- !u!114 &7884604544248928662
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4504014508030327488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3}
m_Name:
m_EditorClassIdentifier:
scope: 1
key: normal
value: normal
--- !u!114 &3195644961600647213
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4504014508030327488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3}
m_Name:
m_EditorClassIdentifier:
scope: 1
key: auto
value: auto
--- !u!114 &8994370576535070087
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4504014508030327488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3}
m_Name:
m_EditorClassIdentifier:
scope: 1
key: battle
value: battle

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Fungus/Scripts/Save/SaveData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Fungus
public class SaveData
{
public int version = FungusConstants.CurrentSaveGameDataVersion;
public string saveName;
public string saveName, category;
public StringPairList saveDataItems;
public StringPairList stringPairs;
public string lastWrittenDateTimeString;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Fungus/Scripts/Save/SaveGameMetaData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Fungus
/// </summary>
public class SaveGameMetaData
{
public string saveName;
public string saveName, category;
public string description;
public System.DateTime lastWritten;
public string fileLocation;
Expand Down