- Home /
Question by
Raiden-Freeman · Feb 21, 2015 at 09:12 AM ·
c#guievent
When does Drop UI event get called?
I have this simple class:
public class t : MonoBehaviour {
public void a()
{
Debug.Log("hi");
transform.localScale = new Vector2(1.4f, 1.4f);
transform.position = Input.mousePosition;
}
public void g()
{
Debug.Log("bb");
transform.localScale = Vector2.one;
}
}
and an image on a canvas. I'm adding to the image a trigger event with 2 events: a drag event and a drop event. On the drag event I'm calling method a, on the drop method g. When I'm dragging the image, it calls a, but when I release the mouse button, g never gets called. Why?
If I use EndDrag, it does get fired when I release the mouse, when is Drop supposed to get called?
Comment
Your answer
Follow this Question
Related Questions
Example of setting up a button OnClick event via scripting? 2 Answers
Multiple Cars not working 1 Answer
ExecuteEvents.Execute pass object to from ui 1 Answer
Issues when hooking GUI to code 0 Answers
When I pause my game and enable canvas and then resume my keyboard starts controlling the menu... 1 Answer