added quick test of taking ownership and deleting. Both work well

handTracking
Kyle Johnsen 2022-01-03 23:45:10 -05:00
parent 1a57cd3879
commit 775bc52e3e
1 changed files with 15 additions and 0 deletions

View File

@ -75,6 +75,21 @@ public class PlayerController : NetworkObject
{ {
owner.networkInstantiate("TestNetworkedGameObject"); owner.networkInstantiate("TestNetworkedGameObject");
} }
if (Input.GetKeyDown(KeyCode.BackQuote))
{
foreach(KeyValuePair<string,NetworkObject> kvp in owner.manager.objects)
{
owner.takeOwnership(kvp.Key);
}
}
if (Input.GetKeyDown(KeyCode.Backspace))
{
foreach (KeyValuePair<string, NetworkObject> kvp in owner.manager.objects)
{
owner.networkDestroy(kvp.Key);
}
}
} }
} }
} }