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 Dalsia · Sep 01, 2019 at 06:47 AM · uitextmeshgui-button

GUI Text/Buttons acting strangely despite similarities to normal-acting UI elements

I created a pause menu the other day, which I think came out pretty nice. I followed the exact same procedure - in regard to using Unity's UI system and laying out my UI elements in the scene - when creating my start menu, but for some reason there is a myriad of strange behavior occurring with my start menu. I'm using TextMeshPro for both my buttons and text.

Here is my pause menu. Notice how the scene and game views have mirrored behavior; I hover over the "Resume" button in the game, and it's highlighted correctly both in the game and in the scene:

alt text


Now for the start menu issues. Please note that these issues are happening in Play mode. The first thing I'm noticing is that my text is distorted in the game view, but not in the scene view:

alt text


I should mention that I created the buttons in the start menu from the same prefab that was used to create the buttons in my pause menu. How could their behavior differ? Here are two other screenshots showing the button component setup, and a weird highlighting issue (notice the discrepancy between the scene and game views):

https://imgur.com/a/39IQzT5

Once I hover over my buttons in the start menu, they remain permanently highlighted.

All the canvases in my game are set to Screen Space: Camera, and each canvas has its own camera; all canvases are at the exact same position; they are also set to Scale With Screen Size, and all the screen reference sizes are the same. I have an event system as a child of each canvas.

I'm fairly certain I'm overlooking something very simple, but I've remade my start menu from scratch several times, making sure, to the best of my ability, that there are 0 differences between the two menus; I even refrained from copy/pasting component values because I was noticing that there were some inconsistencies from doing that.

ui1.png (35.2 kB)
ui4.png (55.6 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 Dalsia · Sep 01, 2019 at 07:28 AM

Okay, this is weird but I figured out how to fix the issue.

I have to set my camera to have some kind of background; previously I had been using "clear depth" in the clear flags setting. I'm not sure why this matters, though, because my pause menu camera, and every other UI camera in my game, have their clear flags set to "depth only" and have no issues rendering any UI.

I would greatly appreciate an explanation of this if someone knows what's going on.

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

186 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 avatar image avatar image avatar image avatar image

Related Questions

Text Mesh Pro : Unable to use pull down menu inspite of Distance field 16 0 Answers

Predict Text Width of String 0 Answers

Changing Text Mesh Pro Text in World Space using C# Script 0 Answers

Scrollbar Movement Issue 0 Answers

Why does my TMP inputfield text disappears when I rotate It, why using a world space camera 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