Skip to content

Commit

Permalink
player data saving (only inventory not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
tddebart committed Apr 15, 2022
1 parent 9c95a7d commit 5e3eff6
Show file tree
Hide file tree
Showing 23 changed files with 872 additions and 305 deletions.
129 changes: 129 additions & 0 deletions Assets/Prefabs/NetworkManager.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2330286422166840744
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2330286422166840738}
- component: {fileID: 2330286422166840741}
- component: {fileID: 2330286422166840740}
- component: {fileID: 2330286422166840743}
- component: {fileID: 2330286422166840742}
m_Layer: 0
m_Name: NetworkManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2330286422166840738
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2330286422166840744}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2330286422166840741
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2330286422166840744}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3}
m_Name:
m_EditorClassIdentifier:
offsetX: 0
offsetY: 0
--- !u!114 &2330286422166840740
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2330286422166840744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 65b4decd1233de049b25af525ac06071, type: 3}
m_Name:
m_EditorClassIdentifier:
dontDestroyOnLoad: 1
runInBackground: 1
autoStartServerBuild: 1
serverTickRate: 60
offlineScene: Assets/Scenes/MainMenu.unity
onlineScene: Assets/Scenes/World.unity
transport: {fileID: 2330286422166840742}
networkAddress: localhost
maxConnections: 100
authenticator: {fileID: 0}
playerPrefab: {fileID: 1296084350405261137, guid: 8a50591d2882aa24b8411ec3d56230ba,
type: 3}
autoCreatePlayer: 0
playerSpawnMethod: 0
spawnPrefabs:
- {fileID: 6234775325344616128, guid: 68c400e121d408140a9e6c298c92396d, type: 3}
WorldServerPrefab: {fileID: 6234775325344616128, guid: 68c400e121d408140a9e6c298c92396d,
type: 3}
--- !u!114 &2330286422166840743
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2330286422166840744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6b0fecffa3f624585964b0d0eb21b18e, type: 3}
m_Name:
m_EditorClassIdentifier:
Port: 7777
DualMode: 1
NoDelay: 1
Interval: 10
Timeout: 2147483647
FastResend: 2
CongestionWindow: 0
SendWindowSize: 4096
ReceiveWindowSize: 4096
MaxRetransmit: 40
NonAlloc: 1
MaximizeSendReceiveBuffersToOSLimit: 1
ReliableMaxMessageSize: 298449
UnreliableMaxMessageSize: 1199
debugLog: 0
statisticsGUI: 0
statisticsLog: 0
--- !u!114 &2330286422166840742
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2330286422166840744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61b93ff779f4ef84da855aef42076949, type: 3}
m_Name:
m_EditorClassIdentifier:
Channels: 0200000001000000
Timeout: 25
SteamAppID: 480
AllowSteamRelay: 1
UseNextGenSteamNetworking: 1
InitFacepunch: 1
SteamUserID: 0
7 changes: 7 additions & 0 deletions Assets/Prefabs/NetworkManager.prefab.meta

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

116 changes: 116 additions & 0 deletions Assets/Resources/Prefabs/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,11 @@ MonoBehaviour:
checkIncrement: 0.05
reach: 4.5
cam: {fileID: 3114816152506633376}
inventory: {fileID: 0}
f3KeyComboUsed: 0
escapeMenuOpen: 0
PlayerName:
SteamId: 0
--- !u!114 &-873992875956742777
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -719,8 +722,121 @@ MonoBehaviour:
type: 3}
SlotTextPrefab: {fileID: 3992299508821768992, guid: a222424fde0043148a65b49b909fca6e,
type: 3}
slots:
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
- type: 0
count: 0
index: 0
isOpen: 0
inventoryHighlightRect: {fileID: 0}
pickedUpSlot:
type: 0
count: 0
index: 0
selectedSlotIndex: 0
--- !u!114 &1296084350405261148
MonoBehaviour:
Expand Down
66 changes: 66 additions & 0 deletions Assets/Resources/Prefabs/WorldServer.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6234775325344616128
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6234775325344616143}
- component: {fileID: 6234775325344616142}
- component: {fileID: 6234775325344616129}
m_Layer: 0
m_Name: WorldServer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6234775325344616143
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6234775325344616128}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6234775325344616142
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6234775325344616128}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c21d1551f63432f81427e73fd8aaa81, type: 3}
m_Name:
m_EditorClassIdentifier:
syncMode: 0
syncInterval: 0.1
--- !u!114 &6234775325344616129
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6234775325344616128}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneId: 0
serverOnly: 0
visible: 2
m_AssetId:
hasSpawned: 0
7 changes: 7 additions & 0 deletions Assets/Resources/Prefabs/WorldServer.prefab.meta

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

Loading

0 comments on commit 5e3eff6

Please sign in to comment.