Unity runtime map system code example
Example: new unity input system bool switch
/// <summary>
/// in the action map, add a press interaction
/// and set the trigger behaviour to press and release
/// replace 'Function' with your action name
/// </summary>
void OnFunction()
{
bool = !bool
}