LoginSignup
3
2

More than 5 years have passed since last update.

UnityのIL2CPPビルドにおいてGPU Instancingだと何故か描画されない問題について

Last updated at Posted at 2018-09-27

藍澤光の誕生日なので初透光です。

前提環境

  • Unity 2018.3.0b2

問題

GPU Instancingで超大量のオブジェクトを描画しようとするとエディター上では描画できますがIL2CPPビルドした実機上で描画されません。

解決策

Edit > Settings > Graphics > Shader Stripping > Instancing Variantsの設定をStrip UnusedからKeep Allに変更します。
エディター上では全てのシェーダーがメモリ上に乗っているため描画できますが、IL2CPPビルドをするとGPU Instancing有効なシェーダーを不要と判断して捨ててしまい、結果として実機上で何も描画しないようです。

Unity2018.3からPreferencesはSettingsに統合されました。設定を探す手間が省けますね。 なぜこれまで分けていたのか?

感想

こういうピットフォールほんとひで

3
2
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
3
2