LoginSignup
5
6

More than 5 years have passed since last update.

GitHub上でWebプレイヤー形式のUnityを実行させる。

Last updated at Posted at 2016-06-10

GitHub上でUnityを動かした時の備忘録

目次

①WebPlayer形式でゲームをビルドする
➁GitHub上にWebページを作る
③ビルド下ゲームをWebページに配置する

①Unity側の設定

aa.png
Platformを「Webプレイヤー」に切り替える。
適当なフォルダにビルドして終わり。

➁GitHubの設定

bb.png
「Automatic page generator」をクリックすると、GitHub上にWebページを作成出来る。
しばらく、テンプレートなどの設定画面に入るが適当なものを選んで完了させる。
このWebページ自体は「gh-pages」というBranchに保管されている。
そこで、ビルドしたUnityのプロジェクトを「gh-pages」にPushする。

③Webページにゲームを載せる

git clone [URL]
このフォルダにビルドしたゲームを入れる
git add --all(ゲームがaddされればOK)
git commit -a
git push origin gh-pages(push先はgh-pagesじゃないとWebページに反映されない)

http://[アカウント名].github.io/[リポジトリ名]/[①で出力されたHTMLファイル名]

完成:grin:

5
6
0

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
5
6