Needed: UIBlock-specific hierarchy event processing #321
drew-512
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
The e.g.
Please note Is that along the lines of what you're looking for? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Nova friends,
Our project here is looking good and we think it will be quite encouraging with Nova folks. One snag we're trying to work through and need help with...
There are two cameras:
Camera
for UIBlock screen overlays (e.g. media player UI and controls)Camera
controlled byCinemachine
-- we have a HUD UI system whereUIBlock
"panels" use physics to be spatially managed with automatic camera framing etc.The issue is pointer and scroll event handling. First, we need to inject pointer and scroll updates to the floating layer UIBlock hierarchy via
ScreenPointToRay()
from the static camera. If there is no hit, then we would then inject it to the UIBlock hierarchies shown by the second camera, usingScreenPointToRay()
.In short, there needs to be a way to inject screen ray-based events into specific UIBlock hierarchies.
Hoping there is a solution since many Unity apps have layered cameras, so this issue will only come up again for others. It would be huge to get a snippet we can run from inside the
Nova
namespace that will do the job (and we will maintain a patch here that makes private Nova props / methods internal as needed). My impression was that Nova is supposed to be a wholesale replacement ofCanvas
but this would be a notable exception.I'm guessing the stock answer is to do a hit test on the first camera and then fallback to the second camera. Unfortunately, that is a non-starter since a hit from the first camera could be a coincidental hit from a UIBlock hierarchy aligned to the second camera. Also, we have other UIBlock hierarchies that reside in the background of both cameras.
Thanks!
Drew
Beta Was this translation helpful? Give feedback.
All reactions