The Color Detector is a component that can be used to detect a specific color with tolerance.
A Color Detector analysing three cubes for a Red color. The Output Signal returns High for the red cube, and low for the green and blue cubes
The Color Detector Physical and Logic components can be found under Standard Components > Color Sensor > Color Detector.
It can also be accessed from the GameObject menu or from the Hierarchy Context menu.
A new GameObject will be created if you do not have a GameObject selected. Otherwise, the Color Detector will be added to the selected GameObject
Shows whether the Color Detector is currently active and thus whether it will detect a color
Shows whether or not the Color Detector is currently detecting the Reference Color
The percentage with which the detected color matches the Reference Color
The specific Color Sensor to use for the Color Detector. By default, a Color Sensor will automatically be assigned by either finding a suitable one in the scene or creating a new one
The color which the detected color will be compared with
The minimum Match Percentage at which the Color Detector has a High Output Signal
On Signal High
A UnityEvent that is fired as soon as the Color Detector has a High Output Signal
On Signal Low
A UnityEvent that is fired as soon as the Color Detector has a Low Output Signal
Generate Control Panel for ColorDetector
Click this button to generate a Control Panel for the Color Detector
The Phyisical Color Detector component attached to this Logic component
In the PLC I/O panel you can see the latest input and output values from the PLC
These settings are general https://unit040.atlassian.net/wiki/spaces/PUD/pages/280988469 settings.
Assign a Color Detector physical component to a GameObject, or create a new one directly from the menu
Select the desired settings under the Properties tab
In Play Mode, the Match Percentage of detected objects will be displayed, as well as the Output Signal