[SOLVED][Text UI] - Shadow component : How to get full color instead of tint ?
Hi,
I'm using a custom font with icones as characters. I would like to have them to drop a shadow with a specific color. I use the Shadow component build in Unity (2018.3) to do that.
As of now, the result is this :
It duplicates the original character and tint it with the input color (here I use green).
But what I'd like it to do is this :
Replace the whole thing with solid color.
I found the shadow.cs script and managed to modify it, but I don't know how to get the color to work as I want.
Does anyone know how to do it ? And if you have another way of achieving the solid color shadow thing, I'm in !
Answer by arkogelul · Aug 29, 2019 at 01:02 PM
For those interested, we've found the solution. We didn't use the shadow.cs script. We used this shader on the text. https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Sprites/SpriteDropShadow.shader
For having the shadow to be uniform we just changed from this at line 60 :
color = IN.color *_ShadowColor;
to this
OUT.color = _Color;