added quick test of taking ownership and deleting. Both work well
parent
1a57cd3879
commit
775bc52e3e
|
|
@ -75,6 +75,21 @@ public class PlayerController : NetworkObject
|
|||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue