How do I set the pivot to the exact position as parent object?
I am trying to make a UI child element scale uniformly to its parent and also retaining the exact positioning relative to its parent. It seems the solution is if I place the child's pivot to the exact pivot position of its parent and anchors are at the corner of the child UI. The problem is I can't make the child's snap to the exact position of its parent.
Pivot doesn't seem to snap to grid, maybe my settings for snap are wrong?
I can't put it exactly on the parent's pivot, is a way in editor that I can do that?
Maybe there's an easier way to do that, like the anchor presets?
Try not spreading the child's anchor and set its position relative to your parent. [Say you set the child's anchors as Anchor $$anonymous$$inX = $$anonymous$$axX = 0.4 and $$anonymous$$inY = $$anonymous$$axY = 0.2]. Now in your root canvas set the "Canvas Scaler"'s Scale $$anonymous$$ode to "Scale with screen size", set up your reference resolution to the resolution that you are building for [Eg. X=1920 , Y = 1080] and "Screen $$anonymous$$atch $$anonymous$$ode" to "$$anonymous$$atch Width or height" and set the "$$anonymous$$atch " = 0.5. See if this works. :)
Your answer
Follow this Question
Related Questions
Following object (arrow) slides off of a object 1 Answer
Having trouble animating sine wave out of child objects 0 Answers
Problem with parent gameObject not where it should be after adding childs 0 Answers
Getting Parent GameObject from Child? 1 Answer
PlayerControlled movement of child of moving object 1 Answer