#OwnedObjects.Find

1 messages · Page 1 of 1 (latest)

quartz cloud
#

How does OwnedObjects.Find work ? What should I write between the parentheses, replacing my question marks ? 🙂 I didn't find any explanation about this.

if (Keyboard.current.kKey.wasPressedThisFrame)
{
if (!IsServer) return;

for (ulong clientId = 0; (int)clientId <
                      NetworkManager.Singleton.ConnectedClients.Count; clientId++)
{
    if (NetworkManager.Singleton.ConnectedClients.TryGetValue(clientId, 
                                                                  out var client))
    {
        var healthNetworkVariable =
                 client.OwnedObjects.Find( ??????? ).GetComponent<HealthScript>(); 
                

    }
    else
        Debug.Log("didn't find anything .... ");
}

}