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
}
Also in C#:
- c# list tuple
- how to change scenes in unity
- unity c# get bool from another script
- c# program exit
- c# declare an int list
- c# expandoobject indexer
- c# windows application get current path
- remove first object from list c#
- c# string array
- c sharp exit while loop
- rotatearound unity
- how to clear console in c#
- Unity if object doens't exist
- c# static review
- c# transform
- asp.net concatenate link gridview
- whats a string
- c# region tag
- c# array inst working
- c# exit console
- c# MD5.Create returning nul
- c# remove from list in foreach
- send type as argument c#
- wait without pause anything else unity