0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WebGLビルドの地雷[Unity]

Posted at

はじめに

筆者がウキウキで作ったゲームをビルドしようとした際に失敗したことを羅列していきます。
他のプラットフォームに向けたビルドがwebGLでは通用しないので、気をつけましょう。

目次

  1. Escキーを充てるな
  2. Application.PermanentPathで保存するな
  3. 並列処理にTaskを使うな

Escキーを充てるな

Escキーにメニューを開けたり、直前シーンに戻るの機能性を持たせるのは直感的ですが、WebGLビルドであると、画面を最大から解除する処理が優先されてしまい、想定通りの行動はしません。避けましょう。

Application.PermanentPathで保存するな

ウイルス対策なのか、webビルドではPlayerPrefsしかアクセス権限がありません。エラーが出ないわりには、アプリが動かなくなるので要注意です。

並列処理にTaskを使うな

何故か動かないそうです。普通にCoroutineやIEnumeratorで対応しましょう。

まとめ

筆者と同じような犠牲者を出さないように今回は把握している範囲でまとめてみました。
こういった避けるべき地雷をまとめたものどこかで見れないものだろうか...
もし抜けているものがございましたら、ぜひコメント欄にて共有願います。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?