• 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
3
Question by MyMusicTeacher1 · Apr 06, 2016 at 08:11 AM · uitextmaskmasking

Using UI Text as as mask for an underlying image

Hello there,

While I've seen a lot of post about masking UI text, I was not able to find anything about the issue I'm encountering here : using UI Text as a mask for a child image.

alt text

Setting the Text material to the font's material just display the text in its normal shape (despite unchecking show mask graphic) and completely hide the child image (first image) while setting the Text material to none let it through but in a very ugly way :

alt text

I searched a lot, but I couldn't find any hint. I would really appreciate any help on this issue. Oh by the way, it might be important to precise this title is of course made of dynamic data, so I canno't just convert it to an image.

Thanks a lot,

Thibaut

settings.jpg (130.3 kB)
no-mask.jpg (39.8 kB)
Comment
Add comment · Show 2
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 Cereal_Killa · Jan 17, 2017 at 03:38 PM 0
Share

I'd also like to know the answer to this. Unity's masking abilities seem to be very limited (compared to photoshop/premiere or literally any other image/video editing software).

avatar image Arkaid · Jan 18, 2017 at 04:49 AM 0
Share

It's not an answer to the question, so I won't post it as such. I don't know if text as mask is possible. I'm not sure that is, though.

If you don't want to end up writing your own shader to do that, the simplest thing would be to use bitmap fonts.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by sigug · May 06, 2018 at 10:00 AM

Uhm, why are there no answers? Would love to know that too..

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

Answer by pankti12 · Dec 02, 2019 at 05:29 AM

Hello, did you tried this?

add mask component to text field alt text

then add an image as a child of your masked text alt text


hiearchy.png (2.1 kB)
text-inspector.png (42.5 kB)
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.

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

7 People are following this question.

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

Related Questions

TextMeshPro InputField masking not working 0 Answers

How to see UI image (static) only trough specific UI element of the Scroll Rect? (Scroll View) 0 Answers

UIMask and UIText problem 0 Answers

Select layers to mask in RectMask2D component 0 Answers

Can I combine 2 or more UI masks? 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