A problem about unity and the way it keep in mind the inputs.

Hello,
I’m pretty new in unity and I’m meeting my first big problem, I did not find solution on the internet maybe due to my lack of English vocabulary.

Here is my problem:

I’m using 3 hits (or more) combos, Let’s say X Y X , If I input X Y X when the first punch(X) barely began it will
play the full combo because of unity remember the input, I have another combo X Y A, if I input very quickly
X Y X and X Y A it will force the X Y X combo.SO you cannot change your mind while the game going on around your character.

What I would like is that only the last input matter(and be stored in unity for like 1 second maximum) because of this way more experienced players will be able to take the “Next combo step” they want depending on what the enemy is doing, and it will force them to have a certain timing depending on combos.

In street fighter 4 this is called the buffer input, here is the only key words I had to look for a solution and I failed.

Pardon my English.
Thanks for reading.

I have found how to do it !!
I did it with PlayMaker, I created a FSM that , when you press “x button” set his bool value to true and every other “button’s bool” to false, it last for 0.3sec and then every bools are back to false waiting a button to get pushed. (If you re-push the “x button” then the timer recount the time from 0 to 0.3.)
This way only the last input matter because of every input ask which bool is true and only one can be !
(Maybe this will cause some trouble when I will need to press 2 buttons at the same time to get a special action, it will be a surprise lol )

Hope it will help newbie like me that have a very low knowledge about game making.

Bye !