From 775bc52e3e6cff03170458f5457456e73d83485d Mon Sep 17 00:00:00 2001 From: Kyle Johnsen Date: Mon, 3 Jan 2022 23:45:10 -0500 Subject: [PATCH] added quick test of taking ownership and deleting. Both work well --- .../Assets/VelGameServer/PlayerController.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/TestVelGameServer/Assets/VelGameServer/PlayerController.cs b/TestVelGameServer/Assets/VelGameServer/PlayerController.cs index 0c1b7e6..2de17b7 100644 --- a/TestVelGameServer/Assets/VelGameServer/PlayerController.cs +++ b/TestVelGameServer/Assets/VelGameServer/PlayerController.cs @@ -75,6 +75,21 @@ public class PlayerController : NetworkObject { owner.networkInstantiate("TestNetworkedGameObject"); } + + if (Input.GetKeyDown(KeyCode.BackQuote)) + { + foreach(KeyValuePair kvp in owner.manager.objects) + { + owner.takeOwnership(kvp.Key); + } + } + if (Input.GetKeyDown(KeyCode.Backspace)) + { + foreach (KeyValuePair kvp in owner.manager.objects) + { + owner.networkDestroy(kvp.Key); + } + } } } }