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. In a future release, a more differentiated return value might be available
|
Lua synopsis
|
(1) number uniqueId=sim.getObjectUniqueIdentifier(number objectHandle)
(2) table uniqueIds=sim.getObjectUniqueIdentifier(sim.handle_all)
|
Lua parameters |
Same as C-function
|
Lua return values
|
(1) uniqueId: the unique identifier or nil in case of an error
(2) uniqueIds: a table containing the unique identifiers or nil in case of an error
|