LoginSignup
6

More than 5 years have passed since last update.

Unityで動画素材を表示する方法

Last updated at Posted at 2018-03-28

動画を表示する

今回はUnityで動画を表示する方法を見ていきます。
 

まず動画を用意する。 

※ aviやwmvではなく mp4形式の動画にしましょう。



ステップ1

 

動画をUnityのprojectに ドラッグして入れる。 

そして hierarchyから VideoPlayerを開きます。

bandicam 2018-03-28 16-21-32-628.jpg

そして inspevterの Videoclipに  先ほど入れた動画をドラッグします。

bandicam 2018-03-28 16-23-32-231.jpg




ステップ2

次に Add compornrtから AudioSourceを追加します。

そして AudioSourceに hierarchyにある VideoPlayerをドラッグして追加します。

bandicam 2018-03-28 16-29-11-601.jpg

 


ステップ3
RendarModeを camera for planeに 変更して 

hierarchyにある、MainCameraを Cameraにドラッグして追加します。

bandicam 2018-03-28 16-32-40-106.jpg





これで再生ボタンを押してみると、 動画がきちんと表示されます。 

bandicam 2018-03-28 16-35-35-766.jpg




PS

UDEMYで unity&blender講座なども出しています。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6