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 /
  • Help Room /
avatar image
0
Question by paragraph7 · May 09, 2016 at 11:20 AM · buildfontcustompinksquares

How to include custom Fonts in build (pink squares problem)

(I hope I'm not double posting as the page asked me to log in after my previous question but it was gone after that.) I tried to search google like crazy to fix this in a similar fashion as I did with the Shaders turning pink, that is, by going to Graphics Inspector and adding them there, but I've found no such setting with custom Fonts. I've imported the font into the Assets folder, tried all the different settings in the Font Inspector (Include Font Data On/Off, Dynamic, Ascii, Unicode etc. etc.) but none of them have been included in the game when I have built it. Is there some sort of way of forcing Unity to include the custom Fonts in the build? If they're not included then they'll turn up as pink squares in the build. Anyone?

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

2 Replies

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

Answer by 5c4r3cr0w · May 09, 2016 at 11:37 AM

Add this Shader to your fonts.

 Shader "GUI/3D Text Shader" {
     Properties {
         _MainTex ("Font Texture", 2D) = "white" {}
         _Color ("Text Color", Color) = (1,1,1,1)
     }
  
     SubShader {
         Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
         Lighting Off Cull Back ZWrite Off Fog { Mode Off }
         Blend SrcAlpha OneMinusSrcAlpha
         Pass {
             Color [_Color]
             SetTexture [_MainTex] {
                 combine primary, texture * primary
             }
         }
     }
 }

You'll be able to add your fonts.

Comment
Add comment · Show 4 · 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 paragraph7 · May 09, 2016 at 11:57 AM 0
Share

Hey thanks, I made the Shader now, but realized I've never added a Shader script to text before. What's the best way to go about it?

avatar image 5c4r3cr0w paragraph7 · May 09, 2016 at 12:01 PM 0
Share

You are supposed to add this shader to the material of the text you're using . i.e. your font material.

avatar image paragraph7 5c4r3cr0w · May 09, 2016 at 12:10 PM 0
Share

Ok so now I figured out that the text component needs a material as well :) Thanks for that, problem solved. Was confused because Unity was still drawing the text correctly in editor even without a material.

Show more comments
avatar image
0

Answer by vtran · Jan 12, 2017 at 07:00 PM

I ran into a similar problem where the fonts were not included in the build at all when viewing the editor.log after a build. I fixed it by moving the fonts into a Resource folder.

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

58 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

Related Questions

magenta screen on game start on iOS port of a game 0 Answers

Build Font Changes on different computer. 1 Answer

Pink / Purple artifacts after building Baked lights 0 Answers

Why does my font stop rendering after some builds? 0 Answers

Unity (default) Fonts going pink in build (pink squares!!!!) 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