Video Player 컴포넌트는 다양한 소스에서 임포트한 콘텐츠를 재생할 수 있습니다.
동영상 클립 에셋을 생성하고 사용하려면, 우선 동영상 파일을 임포트해야 합니다.
프로젝트 창에 동영상 파일을 드래그 앤 드롭하면 동영상 클립이 생성됩니다.
Assets > Import New Asset… 으로 이동하여 동영상 파일을 임포트해도 동영상 클립을 생성할 수 있습니다.
임포트한 후, 새로 생성된 동영상 클립은 Select VideoClip 창에서(동영상 클립 필드의 오른쪽에 있는 동그란 선택 버튼을 클릭) 또는 해당 Video Player 컴포넌트 필드에 동영상 클립 에셋을 드래그 앤 드롭하여 Video Player 컴포넌트에서 선택할 수 있습니다.
Source 드롭다운 메뉴를 통해 동영상 소스를 URL 로 설정합니다. 이 프로퍼티의 기본값은 Video Clip 입니다. Source 를 URL 로 설정하면 file:// 접두사와 무관하게 파일 시스템의 파일을 직접 사용할 수 있습니다.
URL 소스 옵션은 해당 에셋에 설정해 놓은 설정값을 무시합니다. 즉 사용자가 직접 소스 동영상을 설정해야 합니다. 예를 들어, 웹 URL은 소스 동영상 재생을 위해 웹서버가 필요합니다. 반면에, 일반적인 파일은 Unity가 찾을 수 있는 폴더에 동영상 파일이 있어야 합니다.이 옵션은 Unity가 콘텐츠를 직접 관리할 수 없는 상황이거나, 로컬에 큰 동영상 파일을 저장하고 싶지 않을 때 유용합니다.
Video Player 컴포넌트 소스를 URL 로 설정하면 http:// 및 https://를 통하여 웹 소스에서 동영상을 읽도록 할 수 있습니다. 이러한 경우 Unity는 필요한 사전 버퍼링과 오류 관리 작업을 실행합니다.
에셋 번들에서도 동영상 클립을 읽을 수 있습니다.
동영상 클립을 임포트한 이후에는 동영상 플레이어 컴포넌트상의 Video Clip 필드에 할당하여 동영상 클립을 사용할 수 있습니다.
Unity의 StreamingAssets 폴더에 위치한 파일은 동영상 플레이어 컴포넌트의 URL 옵션을 통하거나(상단 참조) 플랫폼 특정 경로(Application.streamingAssetsPath)를 통하여 사용할 수 있습니다.
2017–06–15 일부 편집 리뷰를 거쳐 페이지 게시됨
Unity 5.6의 새로운 기능
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.