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 NotHalfBrad · Apr 11, 2018 at 12:48 AM · uitextcanvaslayerspixel

Text gets hidden on frames where other text is behind it

  • I have text bubbles, that normally display properly. There is a bubble graphic, and a child text object displayed at a higher layer. the text displays in front of the bubble and is readable, except in this certain scenario, that I'm trying to solve.

  • I also have pop-up damage counters, that are text objects. These appear behind the text bubbles. If there are any of them alive in the scene though, the text inside the text bubbles disappears...


alt text Here you see the empty text bubbles, and one of the red pop-up damage numbers. (The red "1" is actually 6 pixels tall, so the top 2 pixels are being covered by the text bubble)


If I move the text bubbles though, I can see the text displayed behind them... (what the hell?!?) Yet, when all the pop-up damage is gone, the text in the text bubbles returns to back in front of the bubbles...


alt text Here I've moved the bubble to the side, and the vanished text is there, hiding.


  • As a test, I moved the pop-up damage to a layer ABOVE the text bubbles. This made the text bubble text appear again... The problem being, that I didn't want the pop-up damage appearing in front of the text bubbles. (not letting me attach a 3rd image sadly)

  • I also tried swapping the order in the hierarchy, of the parent objects of either my pop-up text or the dialog text-bubbles. This didn't seem to change anything.


So my best guess about this is that it means that text is only displayed on one layer ever, and the newest text sets that layer... This sounds crazy to me though. Can anyone set me straight on what is going on?


  • Each text object is child of an object with a canvas, and each of those objects is also child of an object with a canvas, and so on all the way to the top canvas which is set to worldspace, and the camera set to orthogonal.

  • The Text bubbles are code-instantiated prefabs, where the text is changed at the time they are instantiated. The same is true of the pop-up damage, but the damage spawns much more frequently than the text-bubbles. the pop-up damage lasts for only a second or so, before vanishing. When all pop-up damage is gone, the text bubble text is drawn properly again.


I've run out of ideas to try! Any ideas are appreciated!


sf2.png (83.1 kB)
sf1.png (66.4 kB)
Comment
Add comment · Show 3
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 NotHalfBrad · Apr 11, 2018 at 12:59 AM 0
Share

alt text Demonstration of the text-bubbles working, in the condition that the pop-up damage is set to a layer higher than the text-bubbles.


sf3.png (74.7 kB)
avatar image tormentoarmagedoom · Apr 12, 2018 at 03:25 PM 1
Share

Good day.

The position in the hicheracy is important. In the same level of hicheracy, lower objects will be shown over higher objects. I dont know if it's your case

avatar image NotHalfBrad tormentoarmagedoom · Apr 12, 2018 at 04:46 PM 0
Share

Thanks for the reply! I forgot to mention that one of the things I tried was swapping which was higher in the hierarchy... but that didn't work either. It is good advice though.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by NotHalfBrad · Apr 12, 2018 at 04:44 PM

I'm not happy with this answer, but I found a workaround...

I changed one of the prefabs to use a TextMesh, instead of Text, and now they both play nice with one another. I don't understand why this solution works, or why I couldn't have many different types of Text onscreen.

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

138 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

Related Questions

Canvas UI Priority layers 1 Answer

Pixel perfect UI text/canvas point filtering 0 Answers

How to attach a canvas to a game object properly? 1 Answer

How do I get more freedom with positioning UI Text? 1 Answer

UI Text Component being reset on player when built 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