Setting Fullscreen with Click

Why Hello there… It’s me again! Back with a new issue, setting fullscreen with OnMouseDown!
So I have a settings frame and I want to toggle fullscreen, I have a collider set, but whenever I create the script, it says: The name ‘OnMouseDown’ does not exist in current context. My current Code is

using UnityEngine;

using System.Collections;

public class ToggleFullscreen : MonoBehaviour
{
void Update()
{
if (OnMouseDown){
Screen.fullScreen = !Screen.fullScreen;
}

}

}

If anyone could help, that would be great!

OnMouseDown is a built in unity function. What you’re looking for is:

if (Input.GetMouseButtonDown(0)){

}