-1
\$\begingroup\$

enter image description here

I have a question regarding to the size of images in the prefab versus UI/Image.
When I drag prefab(SlotWheel) into the Scene editor, my images get scale larger.
The original image that composed become the prefab is on the right (UI/Image) with 100 width and 100 height.
In this case, how do I recalculate the height on each UI/Image in the prefabs - even though I multiply the height with scale y still doesn't add up with the height of the canvas?
I have preset Canvas Scaler's reference resolution to x:1136 and y:640. And canvas render mode is set to Screen space overlay.

\$\endgroup\$
0
\$\begingroup\$

As you can clearly see right there in the transform of "SlotWheel", that your SlotWheel object, has a scale of "3.901" on (x,y,z).

So all your little child objects that belong to SlotWheel, will all have a scale of :

The child's scale * parent's scale.

Just set the parent "SlotWheel" to 1, and all the children to 1, and you'll have the usual scale of the UI/Image you showed.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ if this the case, is there a way for me to preset all the scale become 1? Or do I need to set it to 1 every time I add a new prefabs? \$\endgroup\$ – WenHao May 20 '15 at 17:09
  • \$\begingroup\$ I don't think it's that much work to set a prefab's scale.. \$\endgroup\$ – Zee May 20 '15 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.