Regular API function

simGetObjectUniqueIdentifier / sim.getObjectUniqueIdentifier

Description Retrieves an object's unique identifier (an object handle is unique, but not across opened scenes. Additionally, if a huge amount of objects are created/destroyed (>2000000), then handles of destroyed objects will be reused. This is not the case with unique identifiers).
C synopsis simInt simGetObjectUniqueIdentifier(simInt objectHandle,simInt* uniqueIdentifier)
C parameters
objectHandle: object handle, or sim_handle_all to retrieve all object identifiers
uniqueIdentifier: pointer to the unique identifier, or if sim_handle_all is specified as the object handle, then the pointer points to several values. The user is in charge of reserving the buffer (size 1 if handle is specified, or number of objects in the scene if sim_handle_all is specified)
C return value
-1 if operation was not successful
Lua synopsis
(1) int uniqueId=sim.getObjectUniqueIdentifier(int objectHandle)
(2) table uniqueIds=sim.getObjectUniqueIdentifier(sim.handle_all)
Lua parameters
Similar to the C-function counterpart
Lua return values
(1) uniqueId: the unique identifier
(2) uniqueIds: a table containing the unique identifiers