getChildEntityNames method

  1. @override
Future<List<String>> getChildEntityNames(
  1. ThermionEntity entity, {
  2. bool renderableOnly = false,
})
override

Implementation

@override
Future<List<String>> getChildEntityNames(ThermionEntity entity,
    {bool renderableOnly = false}) async {
  var count = get_entity_count(_sceneManager!, entity, renderableOnly);
  var names = <String>[];
  for (int i = 0; i < count; i++) {
    var name = get_entity_name_at(_sceneManager!, entity, i, renderableOnly);
    if (name == nullptr) {
      throw Exception("Failed to find mesh at index $i");
    }
    names.add(name.cast<Utf8>().toDartString());
  }
  return names;
}