ObjectIdResult
The results of an ObjectIdRequest, stored in _result, containing the ObjectIdResult.idToObjectMapping that is needed to interpret the color-encoded object IDs that are rendered in the _destination RenderTexture.
Read time 1 minuteLast updated 4 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 _destination, first by decoding colors from _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 _destination to an index that can then be looked up in _idToObjectMapping. |