Amerio.Stephane Posted October 2, 2018 Posted October 2, 2018 Hello, When using CIGI, findComponentID does not return the requested component ID, but the index of the component in the list. int Cigi::Entity::findComponentID(int entity_type, const char* name) { EntityType* entity = &entity_types[entity_type]; for (int i = 0; i < entity->components.size(); i++) if (entity->components[i].name == name) return i; ///< incorrect ! should be: return entity->components[i].id; return -1; } By the way, a great addition to the API would be to be able to publicly enumerate all known entity type and their component ID.
silent Posted October 3, 2018 Posted October 3, 2018 Amerio, Thanks for patch, issue will be fixed in the next SDK update :) How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts