---
title: 기기 시뮬레이터 확장
product: Unity Editor
version: '6000.0'
latest_version: '7000.0'
status: This page documents version 6000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/ko-kr/engine/6000.0/manual/platform-specific/cross-platform-features/device-simulator/plugins
latest_url: https://docs.unity.com/ko-kr/engine/7000.0/manual/platform-specific/cross-platform-features/device-simulator/plugins.md
last_updated: 2026-10-30
generated_at: 2026-11-20T08:54:35.244Z
locale: ko-kr
---

# 기기 시뮬레이터 확장

> 기기 시뮬레이터 플러그인을 생성하여 시뮬레이터 뷰의 기능과 사용자 인터페이스를 확장하는 방법을 설명합니다.

기기 시뮬레이터는 시뮬레이터 뷰에서 기능을 확장하고 컨트롤 패널의 UI를 변경하는 플러그인을 지원합니다.

## 플러그인 생성##creating-a-plugin

Device Simulator 플러그인을 생성하려면 [DeviceSimulatorPlugin](/engine/6000.0/script-reference/unityeditor/devicesimulation/devicesimulatorplugin.md) 클래스를 확장합니다.

UI를 기기 시뮬레이터 뷰에 삽입하려면 플러그인이 다음을 수행해야 합니다.

* `title` 프로퍼티를 오버라이드하여 비어 있지 않은 문자열을 반환합니다.
* `OnCreateUI` 메서드를 오버라이드하여 UI가 포함된 [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md)를 반환합니다.

플러그인이 이러한 조건을 충족하지 않으면 기기 시뮬레이터가 플러그인을 인스턴스화하지만 시뮬레이터 뷰에 해당 UI를 표시하지 않습니다.

다음 예시는 타이틀 프로퍼티를 오버라이드하고 시뮬레이터 뷰에 UI를 추가하는 플러그인을 만드는 방법을 보여줍니다.

```lang-cs
public class TouchInfoPlugin : DeviceSimulatorPlugin
{
    public override string title => "Touch Info";
    private Label m_TouchCountLabel;
    private Label m_LastTouchEvent;
    private 버튼 m_ResetCountButton;

    [SerializeField]
    private int m_TouchCount = 0;

    public override void OnCreate()
    {
        deviceSimulator.touchScreenInput += touchEvent =>
        {
            m_TouchCount += 1;
            UpdateTouchCounterText();
            m_LastTouchEvent.text = $"Last touch event: {touchEvent.phase.ToString()}";
        };
    }

    public override VisualElement OnCreateUI()
    {
        VisualElement root = new VisualElement();
        
        m_LastTouchEvent = 새 레이블("마지막 터치 이벤트: 없음
        
        m_TouchCountLabel = new Label();
        UpdateTouchCounterText();

        m_ResetCountButton = new Button {text = "Reset Count" };
        m_ResetCountButton.clicked += () =>
        {
            m_TouchCount = 0;
            UpdateTouchCounterText();
        };

        root.Add(m_LastTouchEvent);
        root.Add(m_TouchCountLabel);
        root.Add(m_ResetCountButton);
            
        return root;
    }

    private void UpdateTouchCounterText()
    {
        if (m_TouchCount > 0)
            m_TouchCountLabel.text = $"Touches recorded: {m_TouchCount}";
        else
            m_TouchCountLabel.text = "No taps recorded";
    }
}
```
