Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Voytec · Apr 12, 2015 at 09:38 PM · animationuicanvas

UI: how to properly scale images larger than canvas?

Hi there. I am trying to do an animation. The concept is: on login screen player sees a tower with doors and windows. After he logs in, the camera flies up the tower and zooms in to one of the windows. The problem I encountered is that my image of the tower is larger than canvas and since anchors are limited to the canvas size, tower does not rescale properly with different resolutions. The higher the resolution the more of the tower player can see. Since I used unity animation system do do the "flying up" animation, it works properly only on resolution it was made on... Any ideas? alt text

1.jpg (28.5 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DoTA_KAMIKADzE · Apr 12, 2015 at 10:39 PM

I think this is what you expect, if not then let me know in the comments section below.

  • Your tower should be anchored to the bottom-center with all four anchors at 1 position.

  • Your main UI canvas should use "UI scale mode" - "Scale with screen size". Also it should use "Screen match mode" - "Match width or height", now the thing is I didn't get which part of the tower should be visible with the same visibility range - if width then match width, if height then match height (seems like height...but oh well I think you'll be able to move slider yourself).

Now with that settings your tower will remain the same on screen apart the width/height you set to be possible to expand if aspect ratio changes. I hope that is clear enough.

Comment
Add comment · Show 1 · 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 Voytec · Apr 14, 2015 at 11:00 AM 0
Share

Heh I was using Unity 4.6 and because of that I didnt even realise "canvas scaler" component exists. Did everything as you suggested and it works like charm. Thanks a lot :)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Sprite renderer vs image renderer issues on canvas 1 Answer

Animating GameObject into UI Element 1 Answer

Better way to make big 2D Game. UI Canvas, Transform calculation, animation 0 Answers

Unity Animation performance massive drop 1 Answer

UI Animation Not Playing 1 Answer


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