---
title: "GetAxis"
content_type: tutorial
url: "https://learn.unity.com/tutorial/getaxis-d?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/getaxis-d.md?language=ko&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2019.1"
  - name: "2018.4"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2018.4"
  - name: "2018.3"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2018.3"
  - name: "2018.2"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2018.2"
  - name: "2018.1"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2018.1"
  - name: "2017.4"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2017.4"
  - name: "2017.3"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2017.3"
  - name: "2017.2"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2017.2"
  - name: "2017.1"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=2017.1"
  - name: "5.x"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=5.x"
  - name: "4.x"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko&version=4.x"
available_languages:
  - name: "en"
    url: "https://learn.unity.com/tutorial/getaxis-o.md?language=en"
  - name: "es"
    url: "https://learn.unity.com/tutorial/getaxis-e.md?language=es"
  - name: "ja"
    url: "https://learn.unity.com/tutorial/getaxis-guan-shu.md?language=ja"
  - name: "ko"
    url: "https://learn.unity.com/tutorial/getaxis-d.md?language=ko"
  - name: "zh-cn"
    url: "https://learn.unity.com/tutorial/getaxis-o-1.md?language=zh-cn"
last_updated: "2026-08-04T14:23:50.000Z"
---

# GetAxis

GetAxis로 축 기반 입력을 읽고 Unity 입력 관리자에서 축 설정을 조정하는 방법을 배웁니다.

Unity에서 게임 입력에 기반하여 축을 가져오는 방법을 살펴보고, 이러한 축을 Unity 입력 관리자를 통해 어떻게 수정할 수 있는지 알아보겠습니다.

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

이전: [GetButton 및 GetKey](https://learn.unity.com/tutorial/getbutton-and-getkey?projectId=5c8920b4edbc2a113b6bc26a)

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

## 1. GetAxis

[Video](https://connect-mediagw.unity.com/h1/20220104/videos/c9b3bbba-1096-418a-a059-2697847064c9_U_Beginner_16_GetAxis.mp4) ([Transcript (ko_kr)](https://connect-mediagw.unity.com/h1/20220427/8c5a6981-3458-4162-b361-845b212a7e94_16_Get_Axis.ko.vtt))

## **AxisExample**

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

public class AxisExample : MonoBehaviour
{
    public float range;
    public Text textOutput;
    
    
    void Update () 
    {
        float h = Input.GetAxis("Horizontal");
        float xPos = h * range;
        
        transform.position = new Vector3(xPos, 2f, 0);
        textOutput.text = "Value Returned: " + h.ToString("F2");  
    }
}
```

## **AxisRawExample**

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

public class AxisRawExample : MonoBehaviour
{
    public float range;
    public Text textOutput;
    
    
    void Update () 
    {
        float h = Input.GetAxisRaw("Horizontal");
        float xPos = h * range;
        
        transform.position = new Vector3(xPos, 2f, 0);
        textOutput.text = "Value Returned: " + h.ToString("F2");  
    }
}
```

## **DualAxisExample**

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

public class DualAxisExample : MonoBehaviour 
{
    public Text horizontalValueDisplayText;
    public Text verticalValueDisplayText;
    public float hRange;
    public float vRange;
    
    void Update ()
    {
        float h = Input.GetAxis("Horizontal");
        float v = Input.GetAxis("Vertical");
        float xPos = h * hRange;
        float yPos = v * vRange;
        
        transform.position = new Vector3(xPos, 0, vPos);
        horizontalValueDisplayText.text = h.ToString("F2");
        verticalValueDisplayText.text = v.ToString("F2");
    }
}
```
