How to make 3d Text invisible through 3D Game object... for a complete beginner

Okay, I know that there are a lot of threads about that problem, but I’ve try them and either it does not work for me, either I don’t understand what I have to do… Or the options I have to mess with is not available…

I have Unity 5.5. (the free version) and I’m a complete beginner. Like… The obvious is not obvious for me.
Anyway, the problem is well known: 3D text is visible through other 3D object (walls, cubes, etc) when I try the game.

Here’s what I think I understand I have to do :

  1. Create a new shader and modify its code with what I want (what type of shader ? Unlit? Standard? Compute?)

  2. Apply the font texture (of the font I want to use) to that shader. (That part, I can do)

  3. Apply the shader to a new material created for this purpose (Errr. I can’t. The shader I’ve created is not in the propositions anywhere in the inspector.)

  4. Apply the new material on the mesh renderer. (Can’t do it since I can’t assign the shader to a new material).

I’ve seen something else, and I don’t know if it’s normal : the font texture is completely uneditable.

Can anybody give me a step by step description of what I have to do to solve the problem?

Thanks a lot (And I really am sorry to post another thread about this subject… I really am)

There are plenty of threads around this, and it’s not exactly simple if you don’t understand how shaders work. You need to download the built-in shaders from Unity’s website;

https://unity3d.com/get-unity/download/archive

Then open the Font shader (under “DefaultResources”). Then find the line that says something like (ZTest Always). Set it to “ZTest LEqual”. Then, change the first line of the shader to something like:

Shader “Custom/Text Shader”

So that you can distinguish between them in Unity. Take that shader into your Unity project assets, then use that as the shader for the material, and make sure to add the font texture. As long as you select a font in the Text Options, and use the font texture for that exact font it should work.

But where do I find font texture??

Thank you! :slight_smile:

That’s exactly the kind of answer I needed. It’s clear and everything, and it works! This is amazing :smiley: