From 49d9e7baf08c1e3f7c1e44202ac91f1dd0dd5265 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Tue, 12 Feb 2019 00:40:55 +1100 Subject: [PATCH] Some fina lnetworking fixes --- Assets/Scenes/LobbyScene.unity | 13 +++--- Assets/Scenes/MainScene.unity | 4 ++ .../Multiplayer/Client/ClientLoginManager.cs | 2 + .../Multiplayer/Client/PlayersManager.cs | 2 +- .../Scipts/Multiplayer/Core/LoginProtocol.cs | 2 +- .../Scipts/Multiplayer/Core/PlayerProtocol.cs | 24 +++++++++++ .../Scipts/Multiplayer/Server/LoginManager.cs | 14 +++++++ Assets/Scipts/UI/LobbyUIController.cs | 41 ++++++++++++++++++- Assets/Scipts/Utility/Singleton.cs | 2 +- Assets/VeggieSpots/carrot.prefab | 34 +++++++-------- Assets/VeggieSpots/mushroom_Veggy.prefab | 34 +++++++-------- Assets/VeggieSpots/potatoe_Veggie.prefab | 34 +++++++-------- Assets/VeggieSpots/pumkin_Veggy.prefab | 34 +++++++-------- ProjectSettings/ProjectSettings.asset | 4 +- 14 files changed, 163 insertions(+), 81 deletions(-) diff --git a/Assets/Scenes/LobbyScene.unity b/Assets/Scenes/LobbyScene.unity index f6af691..dbe4bb4 100644 --- a/Assets/Scenes/LobbyScene.unity +++ b/Assets/Scenes/LobbyScene.unity @@ -220,7 +220,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 405724f17a9fdf7498f87dfdb5dbcb9e, type: 3} m_Name: m_EditorClassIdentifier: - playerMan: {fileID: 1535509335} + StartGame: {fileID: 1007511399} --- !u!1 &1007511397 GameObject: m_ObjectHideFlags: 0 @@ -278,10 +278,10 @@ MonoBehaviour: m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_NormalColor: {r: 0.0072332197, g: 0.509434, b: 0, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_DisabledColor: {r: 1, g: 0, b: 0, a: 1} m_ColorMultiplier: 1 m_FadeDuration: 0.1 m_SpriteState: @@ -293,7 +293,7 @@ MonoBehaviour: m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled - m_Interactable: 1 + m_Interactable: 0 m_TargetGraphic: {fileID: 1007511400} m_OnClick: m_PersistentCalls: @@ -357,7 +357,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_AspectMode: 0 - m_AspectRatio: 4.2877293 + m_AspectRatio: 5.338957 --- !u!1 &1535509334 GameObject: m_ObjectHideFlags: 0 @@ -391,7 +391,6 @@ MonoBehaviour: type: 2} RemotePlayerPrefab: {fileID: 1899238032005644, guid: 35b69a93d1dd9c24fbf2ba57dfc4aafb, type: 2} - LocalPlayer: {fileID: 0} --- !u!4 &1535509336 Transform: m_ObjectHideFlags: 0 @@ -733,7 +732,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 70.39752, y: 0} + m_SizeDelta: {x: 0, y: 92.30072} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1973300969 MonoBehaviour: diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index ed530fd..f0be222 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -5517,6 +5517,10 @@ Prefab: propertyPath: m_ramModuleState value: 2 objectReference: {fileID: 0} + - target: {fileID: 177638, guid: 0abab5bb77339e4428787a870eb31bd3, type: 2} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0abab5bb77339e4428787a870eb31bd3, type: 2} m_IsPrefabAsset: 0 diff --git a/Assets/Scipts/Multiplayer/Client/ClientLoginManager.cs b/Assets/Scipts/Multiplayer/Client/ClientLoginManager.cs index 58509c7..4cb6508 100644 --- a/Assets/Scipts/Multiplayer/Client/ClientLoginManager.cs +++ b/Assets/Scipts/Multiplayer/Client/ClientLoginManager.cs @@ -80,6 +80,8 @@ namespace Multiplayer Random.InitState((int)longMsg.Long); } + + } diff --git a/Assets/Scipts/Multiplayer/Client/PlayersManager.cs b/Assets/Scipts/Multiplayer/Client/PlayersManager.cs index a37aac0..f9b57bc 100644 --- a/Assets/Scipts/Multiplayer/Client/PlayersManager.cs +++ b/Assets/Scipts/Multiplayer/Client/PlayersManager.cs @@ -49,7 +49,7 @@ namespace Multiplayer public void DestroyPlayers() { foreach (PlayerData player in Players.Values) - if (player.gameObject != null) + if (player.Player != null) Destroy(player.gameObject); } diff --git a/Assets/Scipts/Multiplayer/Core/LoginProtocol.cs b/Assets/Scipts/Multiplayer/Core/LoginProtocol.cs index 178abbf..b2e7dd3 100644 --- a/Assets/Scipts/Multiplayer/Core/LoginProtocol.cs +++ b/Assets/Scipts/Multiplayer/Core/LoginProtocol.cs @@ -13,6 +13,6 @@ namespace Multiplayer public const short Seed = 304; public const short RemotePlayerJoin = 305; public const short RemotePlayerExit = 306 ; - + public const short QueryGameRunning = 307; } } \ No newline at end of file diff --git a/Assets/Scipts/Multiplayer/Core/PlayerProtocol.cs b/Assets/Scipts/Multiplayer/Core/PlayerProtocol.cs index c7af08f..67ae525 100644 --- a/Assets/Scipts/Multiplayer/Core/PlayerProtocol.cs +++ b/Assets/Scipts/Multiplayer/Core/PlayerProtocol.cs @@ -67,6 +67,30 @@ namespace Multiplayer } } + public class BoolMsg : PlayerMsg + { + public bool boolean; + + public BoolMsg() { } + public BoolMsg(byte PlayerID, bool boolean) : base(PlayerID) + { + this.boolean = boolean; + } + + public override void Serialize(NetworkWriter writer) + { + base.Serialize(writer); + writer.Write(boolean); + } + + public override void Deserialize(NetworkReader reader) + { + base.Deserialize(reader); + boolean = reader.ReadBoolean(); + } + + } + public class QuaternionMsg : PlayerMsg { diff --git a/Assets/Scipts/Multiplayer/Server/LoginManager.cs b/Assets/Scipts/Multiplayer/Server/LoginManager.cs index 3faea75..50b365d 100644 --- a/Assets/Scipts/Multiplayer/Server/LoginManager.cs +++ b/Assets/Scipts/Multiplayer/Server/LoginManager.cs @@ -12,6 +12,10 @@ namespace Multiplayer private ServerManager ServerManager; + + private bool isGameRunning = false; + + public LoginManager(ServerManager ServerManager) { this.ServerManager = ServerManager; @@ -27,6 +31,7 @@ namespace Multiplayer ServerManager.Server.RegisterHandler(PlayerMsgID.Lobby, GoToLobby); ServerManager.Server.RegisterHandler(PlayerMsgID.GameWin, OnGameWin); ServerManager.Server.RegisterHandler(PlayerMsgID.GameOver, OnGameOver); + ServerManager.Server.RegisterHandler(LoginMsgID.QueryGameRunning, QueryGameState); } @@ -94,6 +99,8 @@ namespace Multiplayer private void StartGame() { + isGameRunning = true; + foreach (Player player in ServerManager.AllPlayers.Values) { player.Connection.Send(LoginMsgID.Seed, new longMsg(player.ID, ServerManager.Seed)); @@ -125,9 +132,16 @@ namespace Multiplayer private void GoToLobby(NetworkMessage msg) { + isGameRunning = false; + foreach(Player player in ServerManager.AllPlayers.Values) player.Connection.Send(PlayerMsgID.Lobby, new PlayerMsg(player.ID)); } + + private void QueryGameState(NetworkMessage msg) + { + msg.conn.Send(LoginMsgID.QueryGameRunning, new BoolMsg((byte)msg.conn.connectionId, isGameRunning)); + } } } \ No newline at end of file diff --git a/Assets/Scipts/UI/LobbyUIController.cs b/Assets/Scipts/UI/LobbyUIController.cs index 69ac413..218fbad 100644 --- a/Assets/Scipts/UI/LobbyUIController.cs +++ b/Assets/Scipts/UI/LobbyUIController.cs @@ -1,16 +1,55 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Networking; +using Multiplayer; +using UnityEngine.UI; public class LobbyUIController : MonoBehaviour { + public Button StartGame; + private float lastTime; + private void Start() { - Multiplayer.PlayersManager.Instance.LocalPlayer.gameObject.GetComponent().heldVeggie = null; } + + + private void OnEnable() + { + Multiplayer.ClientManager.Instance.Client.RegisterHandler(LoginMsgID.QueryGameRunning, isGameRunning); + } + + private void OnDisable() + { + ClientManager.Instance.Client.UnregisterHandler(LoginMsgID.QueryGameRunning); + } + + + public void Update() + { + if (Time.time - lastTime > 1) + { + ClientManager.Instance.SendMessage(LoginMsgID.QueryGameRunning); + lastTime = Time.time; + } + } + + public void OnClickStartGame() { Multiplayer.ClientManager.Instance.SendMessage(Multiplayer.PlayerMsgID.GameStart, new Multiplayer.PlayerMsg(Multiplayer.ClientManager.Instance.ID)); } + + public void isGameRunning(NetworkMessage msg) + { + BoolMsg boolMsg; + if (!Multiplayer.Utility.ReadMessage(msg, out boolMsg)) + return; + + + StartGame.interactable = !boolMsg.boolean; + } + } diff --git a/Assets/Scipts/Utility/Singleton.cs b/Assets/Scipts/Utility/Singleton.cs index e0956b7..00af291 100644 --- a/Assets/Scipts/Utility/Singleton.cs +++ b/Assets/Scipts/Utility/Singleton.cs @@ -20,7 +20,7 @@ public class MonoSingleton : MonoBehaviour where T : MonoSingleton private void SetAsSingleton() { if (Instance != null && Instance != this) - Destroy(this); + Destroy(this.gameObject); else Instance = (T)this; diff --git a/Assets/VeggieSpots/carrot.prefab b/Assets/VeggieSpots/carrot.prefab index b2c97d6..2cc6fa0 100644 --- a/Assets/VeggieSpots/carrot.prefab +++ b/Assets/VeggieSpots/carrot.prefab @@ -8,15 +8,15 @@ Prefab: m_TransformParent: {fileID: 0} m_Modifications: [] m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} + m_SourcePrefab: {fileID: 0} m_RootGameObject: {fileID: 1191978790607594} - m_IsPrefabParent: 1 + m_IsPrefabAsset: 1 --- !u!1 &1045437373970508 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4479397188757598} - component: {fileID: 33431294167763046} @@ -31,9 +31,9 @@ GameObject: --- !u!1 &1191978790607594 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4993448706942266} - component: {fileID: 33868186554608578} @@ -51,7 +51,7 @@ GameObject: --- !u!4 &4479397188757598 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1045437373970508} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} @@ -64,7 +64,7 @@ Transform: --- !u!4 &4993448706942266 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} @@ -78,7 +78,7 @@ Transform: --- !u!23 &23159349111314626 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1045437373970508} m_Enabled: 1 @@ -113,7 +113,7 @@ MeshRenderer: --- !u!23 &23790350115728832 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} m_Enabled: 1 @@ -148,36 +148,36 @@ MeshRenderer: --- !u!33 &33431294167763046 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1045437373970508} m_Mesh: {fileID: 4300000, guid: 74c23f5ead6217945889193b7c9fecb7, type: 3} --- !u!33 &33868186554608578 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} m_Mesh: {fileID: 4300000, guid: 33c36bdc0d9cadd4d9ae6b882dd21f65, type: 3} --- !u!54 &54232200638652524 Rigidbody: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 + m_UseGravity: 0 + m_IsKinematic: 1 m_Interpolate: 0 m_Constraints: 122 m_CollisionDetection: 0 --- !u!65 &65818395335241826 BoxCollider: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} m_Material: {fileID: 0} @@ -189,7 +189,7 @@ BoxCollider: --- !u!114 &114440221015722654 MonoBehaviour: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1191978790607594} m_Enabled: 1 diff --git a/Assets/VeggieSpots/mushroom_Veggy.prefab b/Assets/VeggieSpots/mushroom_Veggy.prefab index 435f902..499d24e 100644 --- a/Assets/VeggieSpots/mushroom_Veggy.prefab +++ b/Assets/VeggieSpots/mushroom_Veggy.prefab @@ -8,15 +8,15 @@ Prefab: m_TransformParent: {fileID: 0} m_Modifications: [] m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} + m_SourcePrefab: {fileID: 0} m_RootGameObject: {fileID: 1625714886565098} - m_IsPrefabParent: 1 + m_IsPrefabAsset: 1 --- !u!1 &1625714886565098 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4629151296692676} - component: {fileID: 33726525974446366} @@ -34,9 +34,9 @@ GameObject: --- !u!1 &1984510166184500 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4952006183326854} - component: {fileID: 33169155369522874} @@ -51,7 +51,7 @@ GameObject: --- !u!4 &4629151296692676 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} @@ -65,7 +65,7 @@ Transform: --- !u!4 &4952006183326854 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1984510166184500} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} @@ -78,7 +78,7 @@ Transform: --- !u!23 &23076227237857966 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} m_Enabled: 1 @@ -113,7 +113,7 @@ MeshRenderer: --- !u!23 &23125677036450212 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1984510166184500} m_Enabled: 1 @@ -148,36 +148,36 @@ MeshRenderer: --- !u!33 &33169155369522874 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1984510166184500} m_Mesh: {fileID: 4300000, guid: 74c23f5ead6217945889193b7c9fecb7, type: 3} --- !u!33 &33726525974446366 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} m_Mesh: {fileID: 4300000, guid: 5a4501f77ac5ff44280caba31b3acc35, type: 3} --- !u!54 &54413837867327920 Rigidbody: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 + m_UseGravity: 0 + m_IsKinematic: 1 m_Interpolate: 0 m_Constraints: 122 m_CollisionDetection: 0 --- !u!65 &65691259072704084 BoxCollider: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} m_Material: {fileID: 0} @@ -189,7 +189,7 @@ BoxCollider: --- !u!114 &114765665304887144 MonoBehaviour: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1625714886565098} m_Enabled: 1 diff --git a/Assets/VeggieSpots/potatoe_Veggie.prefab b/Assets/VeggieSpots/potatoe_Veggie.prefab index 1eff765..4940aa3 100644 --- a/Assets/VeggieSpots/potatoe_Veggie.prefab +++ b/Assets/VeggieSpots/potatoe_Veggie.prefab @@ -8,15 +8,15 @@ Prefab: m_TransformParent: {fileID: 0} m_Modifications: [] m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} + m_SourcePrefab: {fileID: 0} m_RootGameObject: {fileID: 1962983065673022} - m_IsPrefabParent: 1 + m_IsPrefabAsset: 1 --- !u!1 &1819996850360574 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4734090806519334} - component: {fileID: 33850560214160788} @@ -31,9 +31,9 @@ GameObject: --- !u!1 &1962983065673022 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4303496572474838} - component: {fileID: 33053839186561116} @@ -51,7 +51,7 @@ GameObject: --- !u!4 &4303496572474838 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} @@ -65,7 +65,7 @@ Transform: --- !u!4 &4734090806519334 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1819996850360574} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} @@ -78,7 +78,7 @@ Transform: --- !u!23 &23456570866874480 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} m_Enabled: 1 @@ -113,7 +113,7 @@ MeshRenderer: --- !u!23 &23718685713538394 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1819996850360574} m_Enabled: 1 @@ -148,36 +148,36 @@ MeshRenderer: --- !u!33 &33053839186561116 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} m_Mesh: {fileID: 4300000, guid: 3b0bd59f0036d194e93007a2170e54a8, type: 3} --- !u!33 &33850560214160788 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1819996850360574} m_Mesh: {fileID: 4300000, guid: 74c23f5ead6217945889193b7c9fecb7, type: 3} --- !u!54 &54306878749251866 Rigidbody: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 + m_UseGravity: 0 + m_IsKinematic: 1 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 --- !u!65 &65347772137123934 BoxCollider: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} m_Material: {fileID: 0} @@ -189,7 +189,7 @@ BoxCollider: --- !u!114 &114017568557978584 MonoBehaviour: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1962983065673022} m_Enabled: 1 diff --git a/Assets/VeggieSpots/pumkin_Veggy.prefab b/Assets/VeggieSpots/pumkin_Veggy.prefab index 96feded..2153e9c 100644 --- a/Assets/VeggieSpots/pumkin_Veggy.prefab +++ b/Assets/VeggieSpots/pumkin_Veggy.prefab @@ -8,15 +8,15 @@ Prefab: m_TransformParent: {fileID: 0} m_Modifications: [] m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} + m_SourcePrefab: {fileID: 0} m_RootGameObject: {fileID: 1055933855271796} - m_IsPrefabParent: 1 + m_IsPrefabAsset: 1 --- !u!1 &1055933855271796 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4610351592258104} - component: {fileID: 33773163536459918} @@ -34,9 +34,9 @@ GameObject: --- !u!1 &1986284746880814 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + serializedVersion: 6 m_Component: - component: {fileID: 4177706736023740} - component: {fileID: 33644288213472854} @@ -51,7 +51,7 @@ GameObject: --- !u!4 &4177706736023740 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1986284746880814} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} @@ -64,7 +64,7 @@ Transform: --- !u!4 &4610351592258104 Transform: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} @@ -78,7 +78,7 @@ Transform: --- !u!23 &23105538272536392 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} m_Enabled: 1 @@ -113,7 +113,7 @@ MeshRenderer: --- !u!23 &23505972226273318 MeshRenderer: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1986284746880814} m_Enabled: 1 @@ -148,36 +148,36 @@ MeshRenderer: --- !u!33 &33644288213472854 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1986284746880814} m_Mesh: {fileID: 4300000, guid: 74c23f5ead6217945889193b7c9fecb7, type: 3} --- !u!33 &33773163536459918 MeshFilter: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} m_Mesh: {fileID: 4300000, guid: 5921179f1194c5e4198f1822b30470c0, type: 3} --- !u!54 &54489524204841674 Rigidbody: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 + m_UseGravity: 0 + m_IsKinematic: 1 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 --- !u!65 &65352493392744198 BoxCollider: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} m_Material: {fileID: 0} @@ -189,7 +189,7 @@ BoxCollider: --- !u!114 &114591029731819978 MonoBehaviour: m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1055933855271796} m_Enabled: 1 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 04a0ffd..43a86b1 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49db624a0e6e3613f23cc7ac300bf259521df691b4f67d3ced11b017904df0a9 -size 19716 +oid sha256:6ba4c3d47aa076928780d5f05de2b50ae326177b318f4166b3d7083c5bd4e654 +size 20678