Unity-Technologies / EditorXR

Author XR in XR
Other
925 stars 167 forks source link

Prevent MainMenu ScrollRect elements from throwing an exception in runtime builds #545

Closed dunity closed 5 years ago

dunity commented 5 years ago

Purpose of this PR

Prevent some MainMenu ScrollRect elements that utilize the "AngledVerticalGradientUIClip" shader from throwing a shader-based (no _MainTex) exception in runtime builds. This PR adds a _MainTex property to the AngledVerticalGradientUIClip shader, and hides it in the inspector (as it is unused, but remedies the exception being thrown).

Closes #543

Testing status

Tested using the previous repro: make build, enter session, open main menu. The issue is no longer present in runtime builds.

Technical risk

Low. This PR just adds a hidden _MainTex property to a shader.

Comments to reviewers

None