P
P
PlaBetaVer2020-11-09 10:23:38
Unity
PlaBetaVer, 2020-11-09 10:23:38

How to make a recording of a button click like in a drum pad?

It occurred to me to create a drum pad using unity, buttons with sound are not difficult to make, but I want to make it possible to record button presses so that I can play them later.
I tried to find information on the Internet, it did not work, but I have an idea:
We need to create a list and a timer. Those. when we click on the record button and click on the sound button, the timer starts. When we press the sound button, the values ​​from the timer are written to the list, for example, I pressed the beat (the sound button) at 1.07 seconds, then this value is written to the list, etc.

No other ideas come to mind. Can this be done at all? What happens to optimization if you press the music button too many times.
I'm still wondering how to record all button presses.
I can assume that you need to create an array of buttons, which will contain a list of clicks on them, but the question of optimization still remains open for me

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question