Search Unity

Traverse through all objects in a joint network?

Discussion in 'Scripting' started by vagos21, Oct 8, 2012.

  1. vagos21

    vagos21

    Joined:
    Sep 3, 2012
    Posts:
    18
    Hello everyone,
    I'm using a physics sim to create a network of objects joined with configurable joints. All is well, but when i want to connect a new object to the network, i want to perform some "A" operations if it's already part of the network (to form a closed loop) or "B" operations if it's a new part to be attached to the network. So what i need to do is, traverse all the joined objects and see if my "target point" belongs to the network already.
    How can i find all gameObjects belonging to the network of joined objects?

    thank you for your time!