Unity2018で、Standard AssetsのBloom.csやBloomAndFlares等でビルドエラーなる場合
Unity2017で動いてプロジェクトを2018に移行したところ、
Androidのビルド時に下記エラーに遭遇。
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>().hdr
→ GetComponent<Camera>().allowHDR
に変えたら無事ビルドできました。。
他のBloom.cs
や、SunShafts.cs
等も同様に変更してなんとか移行完了。
Author And Source
この問題について(Unity2018で、Standard AssetsのBloom.csやBloomAndFlares等でビルドエラーなる場合), 我々は、より多くの情報をここで見つけました https://qiita.com/matsuyoro/items/df2ec3109db9ae3550de著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .