> For the complete documentation index, see [llms.txt](https://help.movin3d.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.movin3d.com/kr/movin-studio-usage-guide/live-streaming/streaming-mocap-data-into-unity.md).

# Streaming Mocap Data into Unity

[**Unity**](https://unity.com/)는 세계적으로 널리 사용되는 3D 및 2D 게임 엔진으로, 실시간 렌더링과 높은 개발 유연성이 강점이에요. Unity는 게임 개발뿐 아니라 가상 프로덕션, 애니메이션, 시뮬레이션, 인터랙티브 콘텐츠 등 다양한 산업군에서 활용되고 있습니다.

MOVIN TRACIN과 MOVIN Studio를 통해 얻은 모션캡처 데이터는 Unity로 실시간 스트리밍할 수 있어, 다양한 실시간 프로젝트에 자연스럽게 적용할 수 있습니다.&#x20;

{% embed url="<https://www.youtube.com/watch?v=YvixQUdV1PQ>" %}

{% stepper %}
{% step %}

### 플러그인을 다운로드해주세요.

<figure><img src="/files/qgRNHMk2uaySZh32tM50" alt=""><figcaption></figcaption></figure>

* [MOVIN의 공식 다운로드 페이지](https://www.movin3d.com/downloads#movin-studio)에서 'Download Unity Plugin'을 클릭해, 사용하는 MOVIN Studio 버전에 맞는 UnityPackage 파일을 다운로드해주세요.
  {% endstep %}

{% step %}

### 캐릭터를 MOVIN Studio에 불러온 뒤 리타게팅해주세요.

<figure><img src="/files/7gxc3cG9NA2VfAZpWWly" alt=""><figcaption></figcaption></figure>

* Unity에서 사용하고자 하는 캐릭터의 FBX 파일을 MOVIN Studio에 불러와주세요.&#x20;
  * 해당 과정에 대한 자세한 설명은 [Import Custom Character](/kr/movin-studio-usage-guide/import-custom-character.md) 문서를 참고해주세요.
* 불러온 캐릭터에 대해 리타게팅을 진행해주세요.
  * 해당 과정에 대한 자세한 설명은 [Retargeting](/kr/movin-studio-usage-guide/retargeting.md) 문서를 참고해주세요. &#x20;
    {% endstep %}

{% step %}

### Unity 프로젝트를 킨 뒤, UnityPackage를 불러와주세요.

<figure><img src="/files/hJAK6WiDppt1XHHCWboO" alt="" width="188"><figcaption></figcaption></figure>

* 사용할 Unity 프로젝트를 켜주세요.
* 이후 [#id](#id "mention")에서 다운로드한 UnityPackage를 불러와주세요.

{% hint style="warning" %}
MOVIN이 제공하는 플러그인 (UnityPackage) 는 **Unity 2021 버전 이상**에서만 호환됩니다. \
만약 Unity 2021 버전 미만의 프로젝트를 사용하고 있다면 버전을 업그레이드해주세요.
{% endhint %}
{% endstep %}

{% step %}

### 모션을 적용할 캐릭터의 스켈레톤에서 실제로 모션의 기준이 되는 최상위 Root  Bone(GameObject)에  MocapReceiver 스크립트를 추가해주세요.

* Unity 프로젝트에 사용할 FBX 캐릭터를 Scene 안으로 불러와주세요.

<figure><img src="/files/Ws546m71LUruJlXf7jGb" alt="" width="188"><figcaption></figcaption></figure>

* Hierarchy 창에서 Scene에 배치된 캐릭터의 스켈레톤 계층에서 Root Bone (GameObject)을 선택한 뒤, 해당 GameObject에 MocapReceiver 스크립트를 추가해주세요. &#x20;
  * 해당 예시에서는 `mixamorig:Hips` 입니다.
  * Hierarchy 창에서 캐릭터 GameObject를 펼치면, `mixamorig:Hips`를 시작으로 팔, 다리, 척추 머리 Bone들이 부모-자식 구조로 연결된 스켈레톤 계층을 확인할 수 있습니다. 이중 `mixamorig:Hips`는 캐릭터 모션의 기준이 되는 Root Bone이며, 하위에 위치한 모든 Bone들은 Hips의 움직임을 기준으로 함께 움직입니다. &#x20;

<div><figure><img src="/files/lSJcdWzWvMjfzixcUoUk" alt=""><figcaption></figcaption></figure> <figure><img src="/files/XR8A1F6vwIaEnKm01fan" alt=""><figcaption></figcaption></figure> <figure><img src="/files/HWt29QYFhPHD0Sdk9Syv" alt=""><figcaption></figcaption></figure></div>

* Add Component > Scripts > MOVIN.Core > MocapReceiver를 클릭해 스크립트를 추가해주세요.
  {% endstep %}

{% step %}

### (MOVIN Studio v2.0.0 이상) Bone Search Filter > Root Bone Name에 root bone의 이름을 작성해주세요.

{% hint style="danger" %}
이 설정은 MOVIN Studio v2.0.0 이상의 플러그인에서만 필요한 과정입니다.\
MOVIN Studio v2.0.0 미만을 사용하고 있다면 [#movin-studio-v2.0.0-hip-gameobject-actor](#movin-studio-v2.0.0-hip-gameobject-actor "mention")을 참고해주세요.
{% endhint %}

<figure><img src="/files/Ov7i9tJldwGuItjJLVFC" alt="" width="375"><figcaption></figcaption></figure>

* Bone Search Filter는 Root Bone Name으로 작성된 Bone(Transform)을 기준으로, 그 하위 계층에 포함된 모든 Bone들 중에서 MOVIN Studio에 불러온 캐릭터와 이름이 동일한 Bone을 찾아 1:1로 대응합니다.&#x20;
  * Root Bone Name을 따로 지정하지 않을 경우, 해당 캐릭터의 최상위 계층의 joint를 root bone으로 지정합니다.
* 캐릭터의 hierarchy를 잘 살펴본 뒤 Root Bone Name을 설정해주세요.
  * Root Bone Name을 무엇으로 작성하는지에 따라 MOVIN Studio에서 스트리밍되는 모션 데이터의 일부만 전달되거나 전부가 전달되지 않을 수 있습니다.&#x20;
    {% endstep %}

{% step %}

### (MOVIN Studio v2.0.0 미만) Hip 관절의 부모 GameObject에 Actor 스크립트를 추가해주세요.

{% hint style="danger" %}
해당 과정은 MOVIN Studio v2.0.0 미만의 플러그인에서만 필요한 과정입니다.\
MOVIN Studio v2.0.0 이상을 사용하고 있다면 [#movin-studio-v2.0.0-bone-search-filter-greater-than-root-bone-name-root-bone](#movin-studio-v2.0.0-bone-search-filter-greater-than-root-bone-name-root-bone "mention") 을 참고해주세요.
{% endhint %}

* [#mocapreceiver](#mocapreceiver "mention") 에서 스크립트를 추가한 동일한 방법으로, Hip 관절의 부모 GameObject에 Actor.cs 스크립트를 추가해주세요.
  {% endstep %}

{% step %}

### MOVIN Studio에서 스트리밍을 시작해주세요.

<figure><img src="/files/CKAqSNBczqLUPI6qGO16" alt=""><figcaption></figcaption></figure>

* MOVIN Studio에서 Streaming 탭으로 이동해주세요.
* Unity 프로젝트와 MOVIN Studio가 동일한 PC에서 실행되고 있다면, Host가 127.0.0.1 (localhost) 로 설정되어 있나 확인해주세요.
* Unity 프로젝트 내 GameObject에 설정한 Listen Port를 MOVIN Studio 내 Port Number와 동일하게 설정했는지 확인해주세요.
* Platform이 Unity로 설정되어 있는지 확인한 뒤, Start Streaming 버튼을 클릭해 스트리밍을 시작해주세요.
  {% endstep %}

{% step %}

### Unity 프로젝트에서 Play 버튼을 클릭해주세요.

* MOVIN Studio에서의 모션 데이터가 Unity로 실시간 스트리밍되는 것을 확인할 수 있어요!
  {% endstep %}
  {% endstepper %}

<figure><img src="/files/4dL02wPhCgQPdZ1fv9qs" alt="" width="375"><figcaption></figcaption></figure>

* UnityPackage 내 MOVIN > Scenes 폴더에는 설정이 완료된 3개의 예시 Scene들이 존재합니다. Unity에서의 설정이 어렵다면, 해당 Scene을 열어 설정 방법을 확인해주세요.
  * Sample\_MOVINman의 경우, MOVIN Studio에서 캐릭터를 불러오지 않아도 테스트가 가능합니다.&#x20;
  * Sample\_Ch14 및 Sample\_Ch29의 경우, MOVIN Studio에서 해당 이름에 해당하는 FBX 캐릭터를 불러와야 합니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.movin3d.com/kr/movin-studio-usage-guide/live-streaming/streaming-mocap-data-into-unity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
