- Home /
Remove function from Object
So I'm starting to make a card game in Unity im not really that experienced with unity so excuse my lack of knowledge.
The problem I'm currently facing is that i have a card i can drop onto the table but i can take it back or at least pick it up again. I want to prevent that, i have a script making the Card pickable and placeable but i want to remove this ability from it after it gets dropped.
Thanks for the help in advance
Not nearly enough information here and borders on the "build me something" situation. :-\ What have you tried so far? How do you deter$$anonymous$$e whether something can be "pickable" / "placeable" etc?
So i use DragHandler's to make it dragable. The Card is a child of a panel, when i start dragging it I detach it from the parent, and by stop dragging i set the parent to the panel that its above. For checking if the card is above the droparea i made a script using DropHandler, PointerEnter- and PointerExitHandler. I tried checking if the parent item of the card after droping it, is a dropzone but i don't know how to check that and how to remove the functionality. thanks a lot for your help
Your answer
![](https://koobas.hobune.stream/wayback/20220612161358im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Scaling object by increasing its y position 1 Answer
ARCore Anchor 3D object 0 Answers
Simple way to make an object go up and down?(Y axis) 1 Answer