Where is the corresponding GetObjectsByCategory function in C++


#1

Im trying to write my own scene editor in c++ as practice, and encountered this problem…
somebody some help plz xD


#2

:joy:by problem i mean unable to find the corresponding function in c++ for GetObjectsByCategory


#3

Urho has something called tags, could that be what you’re looking for?


#4

oops, just noticed i provided too less info, sry for that xD
what i wanted is something like this
in the editor it uses GetObjectCategories() and GetObjectsByCategory()
and i checked the api docs we do have Context::GetObjectCategories() in c++, but no GetObjectsByCategory()…
image


#5

Then I think this method is part of the editor’s code. Did you look where GetObjectsByCategory() is defined?


#6

not found in any of the .as files came with the engine


#7

It’s just const HashMap<String, Vector<StringHash> >& Context::GetObjectCategories() const

The info you really want comes from the factory table. Get the factory table, index by the hash above, and use the factory for getting the name or creating and instance.


#8

that seems to be what i need! xD