upd buttons done.

dadwads
Main_Menu
Balex123 2 years ago
parent e603263804
commit a312a489a3

@ -1,18 +1,35 @@
using System.Collections; using System;
using System.Collections.Generic; using System.IO;
using UnityEngine; using System.Runtime.Serialization.Formatters.Binary;
public class SaveLoad : MonoBehaviour // Example class to save and load
[Serializable]
class PlayerData
{ {
// Start is called before the first frame update public int score;
void Start() public string name;
{
} }
// Update is called once per frame class SaveLoad
void Update() {
// Save method
public void Save(PlayerData data, string fileName)
{ {
BinaryFormatter formatter = new BinaryFormatter();
using (FileStream stream = new FileStream(fileName, FileMode.Create))
{
formatter.Serialize(stream, data);
}
}
// Load method
public PlayerData Load(string fileName)
{
BinaryFormatter formatter = new BinaryFormatter();
using (FileStream stream = new FileStream(fileName, FileMode.Open))
{
return (PlayerData)formatter.Deserialize(stream);
} }
} }
}

@ -12,10 +12,10 @@ EditorUserSettings:
value: 0508030352075a085a565a7b41200f44431619287e2925342e2f1b6ae3b86439 value: 0508030352075a085a565a7b41200f44431619287e2925342e2f1b6ae3b86439
flags: 0 flags: 0
RecentlyUsedSceneGuid-2: RecentlyUsedSceneGuid-2:
value: 02095251535050595d5e0f2311735c44124f1c2e7b7077667f7e4560b7b3306b value: 50545254560458595a5e0e7748215d4442161e7e7b2e22342e2c4866b6b4376a
flags: 0 flags: 0
RecentlyUsedSceneGuid-3: RecentlyUsedSceneGuid-3:
value: 50545254560458595a5e0e7748215d4442161e7e7b2e22342e2c4866b6b4376a value: 02095251535050595d5e0f2311735c44124f1c2e7b7077667f7e4560b7b3306b
flags: 0 flags: 0
vcSharedLogLevel: vcSharedLogLevel:
value: 0d5e400f0650 value: 0d5e400f0650

@ -19,7 +19,7 @@ MonoBehaviour:
width: 1536 width: 1536
height: 780.8 height: 780.8
m_ShowMode: 4 m_ShowMode: 4
m_Title: Game m_Title: Hierarchy
m_RootView: {fileID: 2} m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 350} m_MinSize: {x: 875, y: 350}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
@ -120,7 +120,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200} m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 97 controlID: 27
--- !u!114 &6 --- !u!114 &6
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -171,7 +171,7 @@ MonoBehaviour:
m_MinSize: {x: 100, y: 200} m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192} m_MaxSize: {x: 8096, y: 16192}
vertical: 1 vertical: 1
controlID: 98 controlID: 55
--- !u!114 &8 --- !u!114 &8
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -318,7 +318,7 @@ MonoBehaviour:
m_HSlider: 0 m_HSlider: 0
m_VSlider: 0 m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0 m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 0 m_EnableMouseInput: 1
m_EnableSliderZoomHorizontal: 0 m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0 m_EnableSliderZoomVertical: 0
m_UniformScale: 1 m_UniformScale: 1
@ -380,9 +380,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs: 68860000
m_LastClickedID: 0 m_LastClickedID: 34408
m_ExpandedIDs: 28fbffff m_ExpandedIDs: a6caffffc6cbfffffacbffff9ecdffffa6cdffff1cceffff9cdbffffeedbffff28fbffff6c62000080620000a0620000a4620000b8680000ec68000030690000c26a0000d66a0000f66a0000fa6a0000b8850000cc850000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -847,7 +847,7 @@ MonoBehaviour:
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 68.600006} scrollPos: {x: 0, y: 60}
m_SelectedIDs: b2640000 m_SelectedIDs: b2640000
m_LastClickedID: 25778 m_LastClickedID: 25778
m_ExpandedIDs: 000000009a6400009c6400009e640000a064000000ca9a3bffffff7f m_ExpandedIDs: 000000009a6400009c6400009e640000a064000000ca9a3bffffff7f
@ -905,7 +905,7 @@ MonoBehaviour:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 0 m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c623000000000000 m_ExpandedInstanceIDs: c623000000000000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
@ -922,7 +922,7 @@ MonoBehaviour:
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 9} m_ClientGUIView: {fileID: 10}
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
m_InstanceID: 0 m_InstanceID: 0
@ -1090,9 +1090,9 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 1153.6 x: 1177.6
y: 73.6 y: 73.6
width: 381.40002 width: 357.40002
height: 709.8 height: 709.8
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:

Loading…
Cancel
Save