Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
439 B
12
Indexable
Never
    bool HeldCheck;
    void OnceOnHeld()
    {
        bool KeyHeld = Input.GetKey("Whatever");


        if (Input.GetKeyDown("Whatever"))
        {
            //On Down Event
        }
        else if (KeyHeld && !HeldCheck)
        {
            HeldCheck = true;
            //Start Held Process
        }
        else if (!KeyHeld && HeldCheck)
        {
            HeldCheck = false;
            //End Held Process
        }
    }