LoginSignup
1
1

More than 3 years have passed since last update.

Unity2018で、Standard AssetsのBloom.csやBloomAndFlares等でビルドエラーなる場合

Posted at

Unity2017で動いてプロジェクトを2018に移行したところ、
Androidのビルド時に下記エラーに遭遇。

image.png

Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs(80,64): error CS1061: Type `Camera' does not contain a definition for `hdr' and no extension method `hdr' of type `Camera' could be found (are you missing a using directive or an assembly reference?)

Cameraのhdrプロパティがおかしいらしい。

対象のソースの

BloomAndFlares.cs

            // screen blend is not supported when HDR is enabled (will cap values)

            doHdr = false;
            if (hdr == HDRBloomMode.Auto)
                // doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().hdr;
                doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().allowHDR;
            else
            {
                doHdr = hdr == HDRBloomMode.On;
            }

GetComponent<Camera>().hdrGetComponent<Camera>().allowHDR
に変えたら無事ビルドできました。。

他のBloom.csや、SunShafts.cs等も同様に変更してなんとか移行完了。

参考にさせて頂いたサイト
https://forum.unity.com/threads/imageeffects-error-hdr.312009/?_ga=2.39111978.860709088.1569829102-810443181.1569281518

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