Answers for "toggle unity c#"

C#
1

toggle unity c#

private bool togl;//this is either true or false

        if (Input.GetKey(KeyCode.A)) //can have whatever statment you want here
        {							 
            togl = !togl; //this is what changes the bool
        }
Posted by: Guest on May-23-2020

C# Answers by Framework

Browse Popular Code Answers by Language