Search Unity

Question Images vs buttons for interaction?

Discussion in 'Getting Started' started by graciax452, Jul 19, 2022.

  1. graciax452

    graciax452

    Joined:
    Jul 16, 2022
    Posts:
    1
    Hi I'm a beginner and I want to know if I should use images or buttons? I'm creating a musical instrument (harp, kalimba, piano etc with lots of keys/ strings) to play and want it such that there is no lag etc. one way would be to use a button for every key of the instrument, or to use an image and I'm not sure what would work better. I've tried both for a piano and just adding sound to the note but when it gets complicated later what will serve me better, images or buttons? Very new to this day two of unity so please be super specific. I've managed to caret two mini pianos that play from saved notes or midi, so my knowledge is limited.
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Either one will work as there's functionally no difference between them, but a Button is likely faster/simpler to setup as it already includes an Image component and an "On Click" event with it.