Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I did some research, and raycasting doesn't work on UI elements since there is nothing to collide with. I gave it a 2D box collider but the "hitbox" didn't match what I had used (Since the image I had used moved with the canvas, the 2D box collider did not move I assume.) Is there anyway I can use a UI.Graphic.Raycast()? I have been trying to use a Graphic.Raycast but it doesn't seem to be working either. I feel completely helpless on this, because my research on this isn't coming out very fruitful.
This is going to sound very noob of me. But I am not sure how to write something that would identify each card. I understand what it is doing. I have no idea how to rewrite this code so it works for a single card. I had though that "current" was what I needed for that but apparently that doesn't work like I thought. And I can't seem to figure out how to use "this" if it even applies. Additional Info: Each card runs this script.