michal Posted August 16, 2021 Share Posted August 16, 2021 Hello , Is there a better way to find all the existing components of a given type in the world? Unigine::Vector<Unigine::NodePtr> nodes; Unigine::World::getRootNodes(nodes); for (int i = 0; i < nodes.size(); i++) { if (auto componentPtr = Unigine::ComponentSystem::get()->getComponentInChildren<AirportComponent>(nodes.get(i))) { ..... } Thank you. Link to comment
alexander Posted August 16, 2021 Share Posted August 16, 2021 Hi Michal, There is no analogue of C#'s CS FindComponentsInWorld function in C++. Your way is the best at the moment. Best regards, Alexander 1 Link to comment
Recommended Posts