Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
538 B
1
Indexable
Never
   void ConstantOnHeld()
    {
        if (Input.GetKeyDown("Whatever"))
        {
            //On Down Event
        }
        else if (Input.GetKey("Whatever"))
        {
            //On Held Every Frame
        }
    }



    bool HeldCheck;
    void OnceOnHeld()
    {
        if(Input.GetKeyDown("Whatever"))
        {
            HeldCheck = false;
            //On Down Event
        }
        else if(!HeldCheck && Input.GetKey("Whatever"))
        {
            HeldCheck = true;
            //On Held Initially
        }
    }