ObjectIdResult
The results of an ObjectIdRequest, stored in ObjectIdRequest.result, containing the ObjectIdResult.idToObjectMapping that is needed to interpret the color-encoded object IDs that are rendered in the ObjectIdRequest.destination RenderTexture.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public class ObjectIdResult
Remarks
Please see ObjectIdRequest for further information and examples on submitting and using the results of this request.
Additional Resources: ObjectIdRequest.
Properties
Property | Description |
|---|---|
| idToObjectMapping | An array of Objects that can be used to deterimine the object at each pixel in ObjectIdRequest.destination, first by decoding colors from ObjectIdRequest.destination to an index using ObjectIdResult.DecodeIdFromColor, and then by looking up this index in this array. |
Static Methods
Method | Description |
|---|---|
| DecodeIdFromColor | A utility function that can be used to decode colors from ObjectIdRequest.destination to an index that can then be looked up in ObjectIdResult.idToObjectMapping. |