Search Issue Tracker
By Design
By Design in 6000.1.X
Votes
0
Found in
2022.3.54f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-90169
Regression
No
Visual glitches when using Handles API
Reproduction steps:
1. Open the attached "VisualGlitchTest.zip" project
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. In Hierarchy, select “Test Point“ GameObject
4. Observe the GameObject while panning in the Scene view
Expected result: No visual glitches are present
Actual result: Flickering/other graphical glitches are seen
Reproducible with: 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: M1 Max MacOS 15.1.1
Not reproducible on: No other environment tested
Note: Similar glitches are happening inconsistently in all of the Unity Editor windows
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [UWP] Mouse movement re-triggers stale <Mouse>/scroll value after the scroll wheel is used once
- "Shutdown worker was forced killed because it kept running. Worker ..." errors are thrown after building a blank HDRP project
- [UI Toolkit] USS materials in AssetBundles break due to InstanceID referencing a material that no longer exists when a Scene is loaded through Addressables for the second time
- Help button leads to a missing documentation page when clicked on a Font Import Settings in the Inspector
- TextMeshPro Text Component reads bottom-to-top instead of top-to-bottom when using RTL Editor
Resolution Note:
Hi there!
Thanks for reaching out about this problem.
This is actually a known issue caused by the user code. All drawing functions, including the HandleCap, have to be called only during Repaint event.
Indeed, the last parameter of the function is an event type but see that as a filter that says which event should be treated for that call (repaint or layout), but there is no check that it's actually the current event type.
Just adding in your scripts a check that the current event is a repaint event when drawing handles will fix your bug :)
I would invite you to take a look at the documentation on this method that does it the correct way:
https://docs.unity3d.com/ScriptReference/Handles.SphereHandleCap.html
Resolution Note (6000.1.X):
Hi there!
Thanks for reaching out about this problem.
This is actually a known issue caused by the user code. All drawing functions, including the HandleCap, have to be called only during Repaint event.
Indeed, the last parameter of the function is an event type but see that as a filter that says which event should be treated for that call (repaint or layout), but there is no check that it's actually the current event type.
Just adding in your scripts a check that the current event is a repaint event when drawing handles will fix your bug :)
I would invite you to take a look at the documentation on this method that does it the correct way:
https://docs.unity3d.com/ScriptReference/Handles.SphereHandleCap.html