I have a problem with nested canvases after updating to 5.2
Why “Red” image not moving on drag? As expected, you can see moving selection border for image in the scene view, but position of rendered object is not changing.
I have the same problem, and only since 5.2.0, but was initially blaming Mecanim. I’m animating / moving UI elements, some of which are on nested canvases, but it turns out that is what was causing the issue.
“A single Canvas for all UI elements is sufficient but multiple Canvases in the scene is possible. It is also possible use nested Canvases, where one Canvas is placed as a child of another for optimization purposes. A nested Canvas uses the same Render Mode as its parent.”
ya, i’m having some troubles with nesting in 5.2.1p1 too.
if a child element of the main canvas has a canvas that overrides sorting, it and it’s child elements get “stuck”… disabling them, and enabling places them where they’re suppose to go, but doing this in script to correct it just isn’t working, this only works via the editor.
not really sure how to address this as I need those child elements to be able to drawn at a higher layer when selected (to become the upper most layer and over draw the others) as they change size. without the layer ordering, all the elements become mashed up on the same drawing layer.
I’ve also tried setting those elements in canvas to the same sorting layer, and changing the layer order via script when they’re selected and need to be scaled, but that isn’t working either (especially since they get stuck were they’re placed in the canvas when enabled to begin with)
So i remember fixing the nested canvas issue a couple weeks ago (shouldn’t need a renderer as a child). I dont think it has made it way to 5.2 just yet though.
you may have to watch from vimeo in HD to see it, but at times 00:37 & 00:56, when I select the “panelcontext” objects, you will notice only the canvas is present, whereas at time 01:48 the canvas renderer has been added.
(unity version 5.2.1p1)
I suppose it is just a workaround for now? but at some point your fix will be pushed… could you let us know here and i’ld be more than happy to run this through the ringer again .
I’ve noticed that when I have an element (say a panel), that has had a canvas (and renderer [a nested canvas basically]) added, with “Override Sorting” enabled and an order layer higher than its’ parent canvas, the EventSystem will no longer process, pass, or recognize (which ever is the case) any pointer events (pointerEnter, pointerPressed… etc.)
The EventSystem is seeing these events, but just not passing them into the context of the nested canvas.
Is this just by design? I can’t figure out a way to deal with this…