• 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 /
  • Help Room /
avatar image
1
Question by silentsam5 · Oct 12, 2015 at 07:06 AM · transformglitchrecttransformrect

Recttransform keeps changing when I test or play game

In my program, I have my display set up in an empty object called 'display'. In that object I have another empty one called Menu. In that, I have a Back Panel object (w$$anonymous$$ch is literally the backpanel to all my menus) w$$anonymous$$ch contains all the menu content as c$$anonymous$$ldren. So the $$anonymous$$erarchy would look like t$$anonymous$$s:

Display Menu Back Panel Organization Menu Mission Menu etc...

For some reason, every time I set the recttransform for Mission Menu to somet$$anonymous$$ng I want, it changes to somet$$anonymous$$ng else when I play or test my game (note, it is always the same, yet unwanted, number that it changes to). Then, I deleted the object and all its content (the mission menu and its c$$anonymous$$ldren) and remade it. Same t$$anonymous$$ng. Then, I RENAMED Mission Menu to Missions Menu and suddenly it worked! I even went into my scripts and retargeted the Missions Menu where needed. I have no idea why t$$anonymous$$s suddenly worked.

Any idea why t$$anonymous$$s is? It really pissed me off for the better of two hours.

Comment
Add comment · Show 1
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 breban1 · Aug 07, 2016 at 03:53 AM 0
Share

I have this exact same problem, although renaming the object isn't fixing it. Does anyone else have a fix for this? I've tried remaking the object, renaming it, etc. but it still reverts the rect transform to some wierd values.

I want it center/center at 0,0, but it keeps going to bottom left anchors and posX=385.5, posy=254.

This happened when I went from Unity 5.3.4f to 5.4.?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by oliran · Sep 22, 2016 at 12:10 AM

Also same problem here. Rect Transform changes when I $$anonymous$$t play, and the change remains even after I stop. Happened when I had a canvas inside another canvas. Started when I upgraded to 5.4.1. Haven't found a fix yet...

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 breban1 · Sep 22, 2016 at 12:23 AM 0
Share

@oliran If this is related to rect transforms with Canvas components, there is a temporary fix. I can't find the post that this was discussed in, but here is a solution that works for me.

Remove and Re-Add these components from your UI object (if they exist): 1) Canvas Renderer 2) Canvas Scalar 3) Graphic Raycaster

After that you can make your adjustments to your rect and re-run and cross your fingers.

This may be the issue tracker: https://issuetracker.unity3d.com/issues/canvas-inside-canvas-resets-position-slash-anchors-when-entering-play-mode

Looking for the post in the forums now.

UPDATE: Here is the link in the forums: http://forum.unity3d.com/threads/nested-canvases-do-not-save-anchoring-settings.297518/

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

32 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

Related Questions

Need Rect Transform Movement Tips 2 Answers

Raycast gameobjects from a UI image 0 Answers

Convert two contact points in world space to size width in rect 0 Answers

My cube gets stuck at 0 degrees rotation 1 Answer

A strategy for puzzle games: Transform or RectTransform or both? 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