Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Notify Editor when press "+" or "-" icons

Discussion in 'Scripting' started by WanAmir, Mar 30, 2023.

  1. WanAmir

    WanAmir

    Joined:
    Jul 17, 2018
    Posts:
    18
    Hey guys.

    I want to make editor tools whenever I clicked the "+" or "-" icons on List, its automatically create or remove an empty game object and assign it to Feedback Location. Screenshot_1.png
    So how do I "notify" Editor when I clicked the "+" or "-" icon other than OnValidate() function?

    As for the FeedbackTarget I'm using Selection.activeTransform.

    Thank you.
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    9,404
    I would suggest asking on one the UI forums depending on what UI you're using, not the scripting forums.

    I can, of course, move your post for you if you say which one you're using.
     
  3. WanAmir

    WanAmir

    Joined:
    Jul 17, 2018
    Posts:
    18
    This isn't for UI. I want to make an editor tool that can auto generate FeedbackLocation when press "+" icon.
    Then when its triggered, FeedbackTarget move to FeedbackLocation with some speed value.
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    9,404
    So you're not asking how to use the UI to get notifications?