Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ExtinctSpecie · Apr 04, 2017 at 09:33 AM · animation2dcanvasscaleaspect-ratio

Scaling problem , with different aspect ratio , 2d

this is my hierachy Canvas => Scroll Rect => Content => Canvas and under this last canvas is an Image as a background and a Sprite Renderer which has an animation

I did this while having in mind 16:9 aspect ratio but the problem is that when I change to 4:3 aspect ratio my background image scales ok since the first Canvas has a Screen Space - Camera as a Renderer Mode But my animation will not scale as I want it to.

Example :

I have some animated balloons that are being held by a child , the child is on the background image , so on different aspect ratio the balloons will be on "air"

Thanks for your time alt text

alt text

111111111.png (51.3 kB)
444444.png (7.6 kB)
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SohailBukhari · Apr 04, 2017 at 09:36 AM 0
Share

This is because your animation record on local space. $$anonymous$$ake image child of Parent and then record animation on its parent will solve your issue. $$anonymous$$eep the child free or if its not issue with the animation the change canvas scale mode to scale with screen size.

avatar image ExtinctSpecie SohailBukhari · Apr 04, 2017 at 09:51 AM 0
Share

I put my balloons under background image and then I create an animation on the background image and I animate the property of the child object ( balloons ) , is this what you're saying?

avatar image SohailBukhari ExtinctSpecie · Apr 04, 2017 at 09:53 AM 0
Share

yes exactly!

avatar image ExtinctSpecie · Apr 04, 2017 at 11:54 AM 0
Share

alt text

i want the small image to always stay always above the hens leg and not to be so off when aspect ratio is changed so basically i want both of the images act as 1

22222222-min.png (340.4 kB)
3333333333-min.png (277.6 kB)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by hgaur725 · Apr 04, 2017 at 09:57 AM

Change canvas UI scale mode to scale with screen size then try.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ExtinctSpecie · Apr 04, 2017 at 10:07 AM 0
Share

thats already set but unity seems to have some kinda of wierd functions with anchors for example if i have a small icon and i set its anchor to all corners of parent it wont keep its position on every aspect ratio but if i set its anchors to the closest corner it will keep its position on every aspect ratio

avatar image ExtinctSpecie · Apr 04, 2017 at 10:08 AM 0
Share

it is set as a full hd 1920x1080 reference resolution tho

avatar image SohailBukhari ExtinctSpecie · Apr 04, 2017 at 10:52 AM 0
Share

set screen match mode to "Expand" in canvas scaler

avatar image hgaur725 · Apr 04, 2017 at 11:24 AM 0
Share

Well, that's not the case, I mean you can keep the aspect ratio of your icon same for every screen. Suppose you having canvas>panel>icon. set the canvas UI scale to scale with screen size and then you can set anchors of your icon to let's say top left then you can do that by clicking on the anchor of an icon in inspector with alt and shift. Or maybe I will need any image reference of what you asking.

avatar image ExtinctSpecie hgaur725 · Apr 04, 2017 at 11:54 AM 0
Share

Edited my question i added images

avatar image ExtinctSpecie ExtinctSpecie · Apr 04, 2017 at 11:54 AM 0
Share

2 on question and 2 on a comment

Show more comments
avatar image ExtinctSpecie · Apr 05, 2017 at 07:08 AM 0
Share

nop still didnt manage to make it work

avatar image
0

Answer by BeanBugDev · Mar 10, 2020 at 06:30 AM

  1. Canvas Scale mode -> scale with screen size

  2. Change your alignment from center-middle to stretch-stretch on the things you want to not be ruined by different screen ratios

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

182 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make my UI items/canvas stretch to fill preset aspect ratio 0 Answers

2D Animation does not start 1 Answer

EnemyAi animations, are bugged while moving 0 Answers

UI animation when car collides with the border of the track 1 Answer

How to change the sprite property of a 2d sprite light in unity urp? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges