This might seem like a relatively simple question, but I’m a complete idiot and I’m at my wits’ end trying to do extremely basic code. I’m trying to make a character swap to an idle animation after x amount of time of being idle, but I can’t even achieve a simple test print function with
void Update () {
if (Input.anyKeyDown == false) {
print("hello");
}
without it printing repeatedly due to it updating every frame. How do I make it detect my input (or lack thereof) over a period of time and only do something once?