---
title: "OnMouseDown"
content_type: tutorial
url: "https://learn.unity.com/tutorial/onmousedown-2?language=ko"
language: ko
difficulty: beginner
duration_minutes: 5
unity_version:
  - "2019.3"
  - "2019.2"
  - "2019.1"
  - "2018.4"
  - "2018.3"
  - "2018.2"
  - "2018.1"
  - "2017.4"
  - "2017.3"
  - "2017.2"
  - "2017.1"
  - "5.x"
  - "4.x"
supported_unity_versions:
  - name: "2019.3"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2019.1"
  - name: "2018.4"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2018.4"
  - name: "2018.3"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2018.3"
  - name: "2018.2"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2018.2"
  - name: "2018.1"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2018.1"
  - name: "2017.4"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2017.4"
  - name: "2017.3"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2017.3"
  - name: "2017.2"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2017.2"
  - name: "2017.1"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=2017.1"
  - name: "5.x"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=5.x"
  - name: "4.x"
    url: "https://learn.unity.com/tutorial/onmousedown-2.md?language=ko&version=4.x"
last_updated: "2026-08-04T14:22:29.000Z"
---

# OnMouseDown

콜라이더 컴포넌트와 GUI 요소에서 마우스 클릭을 감지하는 방법을 알아봅니다。

콜라이더 또는 GUI 요소에 대한 마우스 클릭을 감지하는 방법을 알아봅니다.

이 튜토리얼은 [스크립팅의 기초 프로젝트](https://learn.unity.com/project/beginner-gameplay-scripting)에 포함되어 있습니다.

이전: [GetAxis](https://learn.unity.com/tutorial/getaxis-o?projectId=5c8920b4edbc2a113b6bc26a)

다음: [GetComponent](https://learn.unity.com/tutorial/getcomponent?projectId=5c8920b4edbc2a113b6bc26a)

## OnMouseDown

[Video](https://connect-mediagw.unity.com/h1/20220104/videos/4bf93d62-14a2-41f5-b35d-507a5d361e65_U_Beginner_17_OnMouseDown.mp4) ([Transcript (ko_kr)](https://connect-mediagw.unity.com/h1/20220427/1a67b7d4-d0a1-4937-a2c8-b5239ac00158_17_On_Mouse_Down.ko.vtt))

## **MouseClick**

```csharp
using UnityEngine;
using System.Collections;

public class MouseClick : MonoBehaviour
{

    private Rigidbody rb;

    private void Awake()
    {
        rb = GetComponent<Rigidbody>();
    }

    void OnMouseDown ()
    {
        rb.AddForce(-transform.forward * 500f);
        rb.useGravity = true;
    }
}
```
