Method GetInstanceIdFromColor
GetInstanceIdFromColor(Color32)
Retrieve the ID associated with the passed in color. If the passed in color is black this service will return 0.
Declaration
public static uint GetInstanceIdFromColor(Color32 color)
Parameters
Type | Name | Description |
---|---|---|
Color32 | color | The color to map to an ID. |
Returns
Type | Description |
---|---|
uint | The ID for the passed in color. |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if the passed in color is mapped to an ID that is greater than the largest supported ID |
InvalidOperationException | Thrown if the passed in color cannot be mapped to an ID in the alpha 255 rangemaxId |