View Issue Details

IDProjectCategoryView StatusLast Update
0001433NoesisGUIUnity3Dpublic2019-03-29 10:37
ReporterstonstadAssigned Tojsantos 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.2.0 
Target Version2.2.1Fixed in Version2.2.1 
Summary0001433: Click Events Not Propagated to Multiple Noesis Views
DescriptionSee video here: https://bit.ly/2u4S1ax

Given a scenario with two cameras and two corresponding Noesis views....

Elements on one view blocks click events from propagating to a secondary view. This manifests as a problem when to views are layered -- the view that renders last and appears over other first views should receive events first -- but instead it receive events last or more often, not at all based on occlusion by a hit test enabled element on the 'lower' view.

I'm setting this to minor because I have an effective work around. When I want focus to be directed to the top noesis view I disable input (keyboard/mouse) on the bottom view.

TagsNo tags attached.
PlatformAny

Activities

jsantos

jsantos

2019-03-26 21:50

manager   ~0005559

I found a way to fix this using Gui.Depth

https://docs.unity3d.com/ScriptReference/GUI-depth.html

The idea is exposing a new Depth property in each NoesisView component to fix this. My first experiments seem to be working fine.
jsantos

jsantos

2019-03-29 10:37

manager   ~0005576

Patch attached in case you want to try it before the release

NoesisView.cs.patch (918 bytes)
Index: NoesisView.cs
===================================================================
--- NoesisView.cs	(revision 7970)
+++ NoesisView.cs	(working copy)
@@ -408,12 +408,6 @@
         _useRealTimeClock = false;
     }
 
-    void Start()
-    {
-        // Disabling this lets you skip the GUI layout phase
-        useGUILayout = false;
-    }
-
     void OnEnable()
     {
         _commands = new UnityEngine.Rendering.CommandBuffer();
@@ -447,10 +441,6 @@
         LoadXaml(false);
     }
 
-    void OnDisable()
-    {
-    }
-
     private Camera[] _allCameras;
     private Camera _rootCamera;
     private Camera _myCamera;
@@ -1064,6 +1054,7 @@
     {
         if (_uiView != null)
         {
+            UnityEngine.GUI.depth = -(int)_myCamera.depth;
             ProcessEvent(UnityEngine.Event.current, _enableKeyboard, _enableMouse, _emulateTouch);
         }
     }
NoesisView.cs.patch (918 bytes)

Issue History

Date Modified Username Field Change
2019-03-21 15:10 stonstad New Issue
2019-03-21 16:26 sfernandez Assigned To => jsantos
2019-03-21 16:26 sfernandez Status new => assigned
2019-03-21 16:26 sfernandez Product Version 2.3.0 => 2.2.0
2019-03-21 16:26 sfernandez Target Version => 2.2.1
2019-03-26 21:50 jsantos Note Added: 0005559
2019-03-29 10:37 jsantos File Added: NoesisView.cs.patch
2019-03-29 10:37 jsantos Note Added: 0005576
2019-03-29 10:37 jsantos Status assigned => resolved
2019-03-29 10:37 jsantos Resolution open => fixed
2019-03-29 10:37 jsantos Fixed in Version => 2.2.1