Method TryGetInstanceIdFromColor
TryGetInstanceIdFromColor(Color32, out uint)
Retrieve the ID associated with the passed in color. If the passed in color is black or cannot be mapped to an ID this service will return false, and the out id will be set to 0.
Declaration
public static bool TryGetInstanceIdFromColor(Color32 color, out uint id)
Parameters
Type | Name | Description |
---|---|---|
Color32 | color | The color to map to an ID. |
uint | id | This value will be updated with the ID for the passed in color. |
Returns
Type | Description |
---|---|
bool | This service will return true if an ID is properly mapped to a color, otherwise it will return false. |