Gimp.Unit.prototype.get_id

function get_id(): Number(gint32) {
    // Gjs wrapper for gimp_unit_get_id()
}
  

The ID can be used to retrieve the unit with [func@Unit.get_by_id].

Note that this ID will be stable within a single session of GIMP, but you should not expect this ID to stay the same across multiple runs.

Returns

The unit's ID.