Search Unity

Question Drag n Drop in specific area

Discussion in 'Scripting' started by Philipp_Goettler, Nov 26, 2022.

  1. Philipp_Goettler

    Philipp_Goettler

    Joined:
    Dec 11, 2021
    Posts:
    28
    Hey, atm i am working on a drag n drop game, and i got some regions where you can spawn units. Those units should only be allowed to move inside of the circle, of there own country (like in the picture).
    So lets say i am spawning a unit from the country with the blue circle. Those units should only be allowed to be drag n droped inside the blue circle. If i then drop the unit from the blue circle inside the inventory of the white circle, those units should then be only allowed to move inside the white circle.
    I hope i could explain in to you good enough cuz english is not my first language :).
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411