I have some prefab objects that are generated from a script. When I have my canvas scaler set to constant pixel size, the fit within the panel they’re supposed to. When I set the ui scale mode to scale with screen size, they do not.
Here are two examples of constant pixel size.
https://www.evernote.com/l/ATqaVDhaWrlMT78pJzTCz4dVkNB-T4V2dI0B/image.png
https://www.evernote.com/l/ATrtLAyMozVIBLbqA9LaKowG6fjwCQGw4jAB/image.png
Here are two examples of scale with screen size.
https://www.evernote.com/l/ATpYQFX8A3tNI6z7fPpcEi8p1lQ784qx3DoB/image.png
https://www.evernote.com/l/ATqZ3L2bwoRImpSKaG6ouSi4Cv-E5KBhmQMB/image.png
I believe you can tell from these pictures, what the problem is. The other UI objects seem to have no issue with any of the scaling settings. I’m trying to set up my UI so that it can work across many different mobile screen sizes and resolutions.
I guess I should have mentioned, I was using Match Width or Height with the match value set to 0.5. I also tried other settings and it seemed to make little to no difference. I currently have the aspect ratio set to 16:9.
– FragmentalThank you for the response! I finally figured it out. See my answer.
– FragmentalThe whole area of the plane counts as "the edge". So sadly no.
– TheFishInABowl