Get Pixels of UI element pointer is over when clicked
Hello everybody. I want to make a drawing app. I have several UI elements in my Canvas: images and buttons. I want to detect the point where the user has clicked if he has clicked on specific image, but do nothing if he clicked another image or some buttons. And after that i need to interact with the pixel(s) he clicked on the image to change their color. How do I get those pixels? I tried raycasting, but it works only with physical objects and colliders, but I want to use only UI elements without any physics, and I do not understand how to use graphic raycaster or any other way to get the pixels of the position of the image which was clicked.
Your answer
Follow this Question
Related Questions
How to place instantiated prefab on ground? 0 Answers
RectTransform Left Right Bottom Top 0 Answers
Rigidbody.position: How can i make my player to not leave the field 0 Answers
When setActive to false Canvas Scaler is wrong 0 Answers
Problem when respawning a rigidbody in the desired position using rigidboy.position. 0 Answers