How to scale up and down and keep aspect ratio?Auto Scale TextView Text to Fit within BoundsAndroid Scale Image to largest sizeDynamically scale images to fit a specified size width and heightProperly scaling or resizing an image or sprite maintaining its original aspect ratioHow to auto-scale to different screen resolutions?How to scale a UIWebview properlyHow to calculate scale based on viewport width and kept aspect ratio, with pure CSS?“Transform.SetParent(parent, false)” to another canvas, the gameobject's anchors was changed incorrectUnity UI: stretching an image over the displayUnity Scaling for all Aspect Ratios for all Android mobile devices
How to extract lower and upper bound in numeric format from a confidence interval string?
Is this story about US tax office reasonable?
Question about exercise 11.5 in TeXbook
How does apt-get work, in detail?
I think I may have violated academic integrity last year - what should I do?
Mother abusing my finances
Comment dit-on « I’ll tell you what » ?
What caused the tendency for conservatives to not support climate change reform?
What are the benefits of cryosleep?
Can a wire having a 610-670 THz (frequency of blue light) AC frequency supply, generate blue light?
What F1 in name of seeds/varieties means?
Restoring order in a deck of playing cards
Is floating in space similar to falling under gravity?
Why doesn't the Earth's acceleration towards the Moon accumulate to push the Earth off its orbit?
Do you play the upbeat when beginning to play a series of notes, and then after?
Where did the “Vikings wear helmets with horn” stereotype come from and why?
What does "Marchentalender" on the front of a postcard mean?
Preserving culinary oils
1960s sci-fi novella with a character who is treated as invisible by being ignored
Why colon to denote that a value belongs to a type?
How can I prevent interns from being expendable?
Can a Beholder use rays in melee range?
How were these pictures of spacecraft wind tunnel testing taken?
How feasible is the Delta-Glider?
How to scale up and down and keep aspect ratio?
Auto Scale TextView Text to Fit within BoundsAndroid Scale Image to largest sizeDynamically scale images to fit a specified size width and heightProperly scaling or resizing an image or sprite maintaining its original aspect ratioHow to auto-scale to different screen resolutions?How to scale a UIWebview properlyHow to calculate scale based on viewport width and kept aspect ratio, with pure CSS?“Transform.SetParent(parent, false)” to another canvas, the gameobject's anchors was changed incorrectUnity UI: stretching an image over the displayUnity Scaling for all Aspect Ratios for all Android mobile devices
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I want to keep the aspect ratio of the white square and the green rectangle above it in both portrait and landscape mode while they fill either width or height.
In the canvas, I've selected Scale With Screen Size
and Match width or height
of 0.5
value.
And Board
GameObject is anchored to the center
The problem is that it keeps aspect ratio but goes out of screen when it doesn't fit.
Update:
It's anchored to the middle center:
Update 2:
After setting anchor to min(0,0),max(1,1)
now the Board
is stretched inside the Canvas
but inner images keep their size and go out of screen in landscape mode:
(Inside Canvas Scaler
component of Canvas
, I changed Match
value from 0.5
to 1 Height
. Now it scales down the height. It works for most of the screen sizes I see, but on very tall screens, the sides go out of screen.)
unity3d scale
add a comment |
I want to keep the aspect ratio of the white square and the green rectangle above it in both portrait and landscape mode while they fill either width or height.
In the canvas, I've selected Scale With Screen Size
and Match width or height
of 0.5
value.
And Board
GameObject is anchored to the center
The problem is that it keeps aspect ratio but goes out of screen when it doesn't fit.
Update:
It's anchored to the middle center:
Update 2:
After setting anchor to min(0,0),max(1,1)
now the Board
is stretched inside the Canvas
but inner images keep their size and go out of screen in landscape mode:
(Inside Canvas Scaler
component of Canvas
, I changed Match
value from 0.5
to 1 Height
. Now it scales down the height. It works for most of the screen sizes I see, but on very tall screens, the sides go out of screen.)
unity3d scale
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it tomin(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21
add a comment |
I want to keep the aspect ratio of the white square and the green rectangle above it in both portrait and landscape mode while they fill either width or height.
In the canvas, I've selected Scale With Screen Size
and Match width or height
of 0.5
value.
And Board
GameObject is anchored to the center
The problem is that it keeps aspect ratio but goes out of screen when it doesn't fit.
Update:
It's anchored to the middle center:
Update 2:
After setting anchor to min(0,0),max(1,1)
now the Board
is stretched inside the Canvas
but inner images keep their size and go out of screen in landscape mode:
(Inside Canvas Scaler
component of Canvas
, I changed Match
value from 0.5
to 1 Height
. Now it scales down the height. It works for most of the screen sizes I see, but on very tall screens, the sides go out of screen.)
unity3d scale
I want to keep the aspect ratio of the white square and the green rectangle above it in both portrait and landscape mode while they fill either width or height.
In the canvas, I've selected Scale With Screen Size
and Match width or height
of 0.5
value.
And Board
GameObject is anchored to the center
The problem is that it keeps aspect ratio but goes out of screen when it doesn't fit.
Update:
It's anchored to the middle center:
Update 2:
After setting anchor to min(0,0),max(1,1)
now the Board
is stretched inside the Canvas
but inner images keep their size and go out of screen in landscape mode:
(Inside Canvas Scaler
component of Canvas
, I changed Match
value from 0.5
to 1 Height
. Now it scales down the height. It works for most of the screen sizes I see, but on very tall screens, the sides go out of screen.)
unity3d scale
unity3d scale
edited Mar 25 at 8:19
Blendester
asked Mar 24 at 8:41
BlendesterBlendester
6631819
6631819
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it tomin(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21
add a comment |
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it tomin(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it to
min(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it to
min(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322005%2fhow-to-scale-up-and-down-and-keep-aspect-ratio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322005%2fhow-to-scale-up-and-down-and-keep-aspect-ratio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you expand the Anchors section of the Board object and take a new screenshot? The anchors are important here.
– Draco18s
Mar 24 at 16:19
@Draco18s Please check the last screenshot.
– Blendester
Mar 25 at 1:37
By anchoring it to the middle center you've said "don't scale this object when the parent scales." Set it to
min(0,0),max(1,1)
– Draco18s
Mar 25 at 3:56
@Draco18s I tried, please check the updated screenshot
– Blendester
Mar 25 at 8:21