Search Unity

Do something when moving UI in edit mode

Discussion in 'Scripting' started by better_walk_away, Jun 15, 2019.

  1. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    291
    Hi, everyone! I have a question.

    How can we run a method when we move a UI image in edit mode using Move Tool?
    Is there a callback method that listens to the events of Move Tool or the changes of RectTransform component?
     
  2. If the save is good enough you can use OnValidate. It is called when you move your image and save the changes.
     
    better_walk_away likes this.