public void CmdCancelOrders( uint platoonNetId) { NetworkIdentity identity; if (NetworkIdentity.spawned.TryGetValue(platoonNetId, out identity)) { PlatoonBehaviour platoon = identity.gameObject.GetComponent <PlatoonBehaviour>(); platoon.RpcCancelOrders(); } }