getObjectById method

Object3D? getObjectById(
  1. String id
)

id -- Unique number of the object instance

Searches through an object and its children, starting with the object itself, and returns the first with a matching id.

Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.

Implementation

Object3D? getObjectById(String id) {
  return getObjectByProperty('id', id);
}