From 3f858ed7d2ac161f189dea115b2ccb7c4dccf56f Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Wed, 16 Jul 2025 02:03:22 -0400 Subject: [PATCH] Fixed an issue where floor markers stop working if a non-owner touches them. --- Assets/Scenes/witwics.unity | 46 +++++++++---------- .../Game Managers/GameManagerRound3.cs | 25 ++++++++-- Assets/UdonSharp/Maps/FloorMapMarker.cs | 1 + .../UtilityScripts/BoneFollower.asset | 2 +- .../UtilityScripts/InteractToggle.asset | 2 +- .../UtilityScripts/PlayerModSetter.asset | 2 +- .../Synced/GlobalToggleObject.asset | 2 +- .../Synced/MasterToggleObject.asset | 2 +- .../UtilityScripts/TrackingDataFollower.asset | 2 +- .../UtilityScripts/WorldAudioSettings.asset | 2 +- 10 files changed, 51 insertions(+), 35 deletions(-) diff --git a/Assets/Scenes/witwics.unity b/Assets/Scenes/witwics.unity index 2baef52..8cb05f7 100644 --- a/Assets/Scenes/witwics.unity +++ b/Assets/Scenes/witwics.unity @@ -8654,12 +8654,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1984509515} m_Modifications: + - target: {fileID: 53336026198256052, guid: aecb18996fccac6488cfcd38604796da, + type: 3} + propertyPath: pickupable + value: 1 + objectReference: {fileID: 0} - target: {fileID: 888791735404605251, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: serializationData.Prefab value: - objectReference: {fileID: 888791735404605251, guid: aecb18996fccac6488cfcd38604796da, - type: 3} + objectReference: {fileID: 0} - target: {fileID: 1275156301651896935, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: serializationData.Prefab @@ -8687,8 +8691,7 @@ PrefabInstance: type: 3} propertyPath: serializationData.Prefab value: - objectReference: {fileID: 4378191350400971135, guid: aecb18996fccac6488cfcd38604796da, - type: 3} + objectReference: {fileID: 0} - target: {fileID: 4397193397240291185, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: m_Enabled @@ -8749,14 +8752,12 @@ PrefabInstance: type: 3} propertyPath: serializationData.Prefab value: - objectReference: {fileID: 6661078953970214780, guid: aecb18996fccac6488cfcd38604796da, - type: 3} + objectReference: {fileID: 0} - target: {fileID: 7540355109082095914, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: serializationData.Prefab value: - objectReference: {fileID: 7540355109082095914, guid: aecb18996fccac6488cfcd38604796da, - type: 3} + objectReference: {fileID: 0} - target: {fileID: 7732218697696289664, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: serializationData.Prefab @@ -8777,8 +8778,7 @@ PrefabInstance: type: 3} propertyPath: serializationData.Prefab value: - objectReference: {fileID: 8806955951299008898, guid: aecb18996fccac6488cfcd38604796da, - type: 3} + objectReference: {fileID: 0} - target: {fileID: 9158833659205316080, guid: aecb18996fccac6488cfcd38604796da, type: 3} propertyPath: _syncMethod @@ -42287,35 +42287,35 @@ MonoBehaviour: DynamicPrefabs: [] DynamicMaterials: - {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2} + - {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2} + - {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2} + - {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2} - {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2} - {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2} - {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2} - {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2} - {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2} - {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2} + - {fileID: 2100000, guid: 95dd396b63c6ad4429ad37eedc63f20c, type: 2} + - {fileID: 2100000, guid: 74aa3dbc50df9464e8d9d11815b389a7, type: 2} - {fileID: 2100000, guid: 79cb8dae66bc60241b5964b24ff1ac7e, type: 2} + - {fileID: 2100000, guid: 5a56ded101f363e46861c8fe1c4f360e, type: 2} + - {fileID: 2100000, guid: 50e427994e5b0224f966b200c577b78b, type: 2} + - {fileID: 2100000, guid: f025bfafc9ecec74aa3aab468ef837d7, type: 2} + - {fileID: 2100000, guid: d811246c848733b4c8310b4dec5a5fdf, type: 2} - {fileID: 2100000, guid: 82bace4c334919c4f92e87905c39fdf8, type: 2} + - {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2} + - {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2} - {fileID: 2100000, guid: 49170bf20870c7c45873b3c1966d86af, type: 2} - {fileID: 2100000, guid: bd8b723337ae5824fa61f693f76e943f, type: 2} - {fileID: 2100000, guid: faae26a849699fc4b804b74882a344df, type: 2} - {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2} - - {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2} - - {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2} - - {fileID: 2100000, guid: d811246c848733b4c8310b4dec5a5fdf, type: 2} - - {fileID: 2100000, guid: 50e427994e5b0224f966b200c577b78b, type: 2} - - {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2} - {fileID: 2100000, guid: 71ede89a28bd60e4ca2918572046ba90, type: 2} - - {fileID: 2100000, guid: 5a56ded101f363e46861c8fe1c4f360e, type: 2} - - {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2} + - {fileID: 2100000, guid: cba30de4550b90f4f8ef7bc7d94faf95, type: 2} + - {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2} - {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2} - - {fileID: 2100000, guid: f025bfafc9ecec74aa3aab468ef837d7, type: 2} - {fileID: 2100000, guid: 220d5a1f1701e674794a1083cc2f0bac, type: 2} - {fileID: 2100000, guid: 341141e903fac3e4ca54a62259c6d01d, type: 2} - - {fileID: 2100000, guid: 95dd396b63c6ad4429ad37eedc63f20c, type: 2} - - {fileID: 2100000, guid: 74aa3dbc50df9464e8d9d11815b389a7, type: 2} - - {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2} - - {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2} - - {fileID: 2100000, guid: cba30de4550b90f4f8ef7bc7d94faf95, type: 2} LightMapsNear: [] LightMapsFar: [] LightMode: 0 diff --git a/Assets/UdonSharp/Game Managers/GameManagerRound3.cs b/Assets/UdonSharp/Game Managers/GameManagerRound3.cs index dfff10f..39216e0 100644 --- a/Assets/UdonSharp/Game Managers/GameManagerRound3.cs +++ b/Assets/UdonSharp/Game Managers/GameManagerRound3.cs @@ -125,7 +125,10 @@ public class GameManagerRound3 : GameManagerBase public void BeginRound() { - GetCurrentMarker().Activated(true); + NetworkCalling.SendCustomNetworkEvent( + (IUdonEventReceiver)GetCurrentMarker(), + NetworkEventTarget.Owner, + "Activated", true); UpdateInterface(); @@ -163,7 +166,10 @@ public class GameManagerRound3 : GameManagerBase { PlayCorrectSound(); - GetCurrentMarker().Activated(false); + NetworkCalling.SendCustomNetworkEvent( + (IUdonEventReceiver)GetCurrentMarker(), + NetworkEventTarget.Owner, + "Activated", false); _FailureCounter = 0; _SuccessCounter++; @@ -186,7 +192,10 @@ public class GameManagerRound3 : GameManagerBase if (_FailureCounter >= MAX_FAILURE_COUNT) { _FailureCounter = 0; - GetCurrentMarker().Activated(false); + NetworkCalling.SendCustomNetworkEvent( + (IUdonEventReceiver)GetCurrentMarker(), + NetworkEventTarget.Owner, + "Activated", false); SetUpNextCountry(); } @@ -225,7 +234,10 @@ public class GameManagerRound3 : GameManagerBase nameof(GameHasBeenLost), true); return; } - GetCurrentMarker().Activated(true); + NetworkCalling.SendCustomNetworkEvent( + (IUdonEventReceiver)GetCurrentMarker(), + NetworkEventTarget.Owner, + "Activated", true); UpdateInterface(); } @@ -272,7 +284,10 @@ public class GameManagerRound3 : GameManagerBase { for (int i = 0; i < _Markers.Length; i++) { - _Markers[i].Activated(false); + NetworkCalling.SendCustomNetworkEvent( + (IUdonEventReceiver)_Markers[i], + NetworkEventTarget.Owner, + "Activated", false); } GameStatusUpdate(RanOutOfMarkers ? GameStatus.RanOutOfMarkers : GameStatus.RanOutOfTime); diff --git a/Assets/UdonSharp/Maps/FloorMapMarker.cs b/Assets/UdonSharp/Maps/FloorMapMarker.cs index 21b55c8..ef44ae9 100644 --- a/Assets/UdonSharp/Maps/FloorMapMarker.cs +++ b/Assets/UdonSharp/Maps/FloorMapMarker.cs @@ -196,6 +196,7 @@ public class FloorMapMarker : UdonSharpBehaviour _CollidingLocations.Clear(); } + [NetworkCallable] public void Activated(bool SetActive) { Active = SetActive; diff --git a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset b/Assets/UdonSharp/UtilityScripts/BoneFollower.asset index b946757..036a370 100644 --- a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset +++ b/Assets/UdonSharp/UtilityScripts/BoneFollower.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: BoneFollower m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5, + serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset b/Assets/UdonSharp/UtilityScripts/InteractToggle.asset index b35639e..13d78db 100644 --- a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset +++ b/Assets/UdonSharp/UtilityScripts/InteractToggle.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: InteractToggle m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864, + serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset index 1def3de..d89a1a4 100644 --- a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset +++ b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: PlayerModSetter m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b, + serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset index 8101274..ea98aa4 100644 --- a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset +++ b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: GlobalToggleObject m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872, + serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset index 901d05e..b4b3ede 100644 --- a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset +++ b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: MasterToggleObject m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91, + serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset index da92932..c624599 100644 --- a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset +++ b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: TrackingDataFollower m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2, + serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555, type: 2} udonAssembly: assemblyError: diff --git a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset index ee4621f..5226f4f 100644 --- a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset +++ b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} m_Name: WorldAudioSettings m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab, + serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694, type: 2} udonAssembly: assemblyError: