Unityでスライドショー(WebGL)

WebGLの簡単なサンプルとしてオーディオを流すスライドショーを作りました。資材は2種類です。

  • オーディオ:Udioで生成したオリジナル「The Last Man」のmp3ファイル
  • イメージ:Microsoft Designerで歌詞を入力して生成した画像のjpegファイル群

UnityでWebGLをビルドするにはFile->Build SettingsでプラットホームをWebGLにしてビルドします。注意点はデフォルトで生成される.圧縮ファイルが読めない場合です。Player Settingに進み、「Compression format」のデフォルトBrotliをDisabledにします。ごれでビルドすれば良いです。

簡単な機能なのに、アニメーションを使って…などと始めると頭抱えて…結局、1枚のキャンバスの画像を順番に入れ替えるC#スクリプトになりました。


ブラウザの挙動によりますが、オーディオはクリックしないと始まりません。スクリプトでスタートさせる方法もありますが、突然に派手な音楽が出るとビックリするかもです。

本当は3Dオブジェクトでリアルなシーンを制作できればカッコ良いのですが、それらしいサルを作るだけでも初心者には気が遠くなる~(笑)

コメント

  1. zoritoler imol より:

    Have you ever thought about including a little bit more than just your articles? I mean, what you say is valuable and all. However think about if you added some great visuals or video clips to give your posts more, “pop”! Your content is excellent but with images and videos, this site could undeniably be one of the very best in its niche. Superb blog!

  2. Hi there, just became aware of your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!

タイトルとURLをコピーしました