-
Notifications
You must be signed in to change notification settings - Fork 855
Add new warning UI for missing debug shaders and wireframe support. #5458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new warning UI for missing debug shaders and wireframe support. #5458
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP URP SRP Core Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's missing changelog and I have one question about the way we check for platforms but pre-approving it as I will be OoO next week and don't want to block this one.
nameAndTooltip = Strings.WireframeNotSupportedWarning, | ||
isHiddenCallback = () => | ||
{ | ||
switch (SystemInfo.graphicsDeviceType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should also get the the graphics APIs in the build settings, that way user might know that when he builds player to some of the platforms the runtime debug might not work? f.ex similar case here: https://sourcegraph.com/github.com/Unity-Technologies/Graphics/-/blob/com.unity.render-pipelines.universal/Editor/RendererFeatures/DecalRendererFeatureEditor.cs?L74-77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. I believe Editor itself only runs on platforms that support wireframe rendering, so build target platform is more relevant when user sees this warning in the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up doing something a bit different here. Instead of looking at build targets, I only show this warning in player builds. AFAIK this is never needed in the editor, only Android Vulkan/GLES have this problem. I think it's better that way you only really care about this information when you are using the debug feature on the device where it might not work correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with the edit.
Regarding Felipe's comment on changelog, I don't believe one is needed because rendering debugger is a new feature on URP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving without testing. Good job with the PR description, all the images, and testing status!
Code seems to be relatively straightforward and shouldn't cause any issues on the URP side.
This PR will be tested manually on mobiles by other QA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning message is hardly noticeable since missing contrast in the UI. It looks like plain text.
The warning text could be set to orange color, or at least the "Warning" word could be colored or bolded.
@TheoWong-pixel what do you think? Might make sense, though the warning message will still look a bit clunky. Might be worth adding better support for warning labels such as this one... |
Yeah this one should be an Info box. and the tooltip should be the message inside. :) its fine for the runtime one, maybe if we can underline it, that would be a bonus. but for the in editor one, it should be an info box. |
- Use it to display "wireframe unsupported" & "missing shaders" warnings in player builds.
- Also don't use deprecated field on URP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Warnings are clear and informative enough. Manually tested using URP Template scene on mobiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Warnings are informative and the orange info box attracts attention, so I see no issues from UI/UX perspective.
# Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md
EDIT: See Update for new screenshots
Purpose of this PR
As described by case 1342315, wireframe mode is not supported on some platforms and graphics APIs (at least Android GLES). This is a limitation with no easy fix, and Unity has not supported wireframes on these platforms in the past (see mention in docs).
Therefore, on these platforms, we display a warning that wireframe might not work. The capability is not exposed to C# so this is the best we can do right now, in the absence of a new C# API.
A note of this behavior should also be added to the documentation when that is written (cc @oleks-k).
Editor:


Runtime:


Testing status
Checked that the message apppears as expected on Windows Vulkan, but not when I switch to Windows DX11.
@evelinastaniulyte are you able to verify if wireframe works correctly on iOS? The bug only mentions Android but I'd like to verify iOS too (both Metal and GLES, if we still support that).