Unity-Technologies / EditorXR

Author XR in XR
Other
928 stars 166 forks source link

Fix image-effect copy exception #487

Closed dunity closed 6 years ago

dunity commented 6 years ago

Purpose of this PR

Fix exception thrown in scenes whose MainCamera isn't tagged as "MainCamera", when attempting to copy the image-effects from the MainCamera to the VRCamera(s). Currently, only the MainCamera should have it's effects copied.

Testing status

Tested in various demo(content) scenes.

Technical risk

Low. This fix presented no exceptions, and is just a null check for an existing camera (tagged as "MainCamera"), performed before proceeding with image-effect copying.

Comments to reviewers

If you'd like to induce the previous exception, for testing purposes, do the following: