Search Issue Tracker
By Design
Votes
0
Found in
4.6.0b6
Issue ID
600874
Regression
No
uGUI with <color> tags should fade out with alpha
To reproduce:
1. Create a uGUI text
2. Add the tags <Color = green> and </Color> to the text, it should turn green
3. Try to change the alpha color of the text - the green text does not fade out
Explanation:
So the color field on Text changes the default color, where as the markup changes the default color for the marked up text. If you wish to have fading as you desire then this can be achieved by modifying the alpha on the CanvasRenderer like so:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(CanvasRenderer))]
public class ColorOverride : MonoBehaviour {
public float alpha = 1;
// Update is called once per frame
void Update ()
{
GetComponent<CanvasRenderer>().SetAlpha (Random.value);
}
}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Joint Physics result in unexpected behaviors when used for articulated vehicles like buses or trucks
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts which worked with TMP Font Asset Creator
shubhamswaraj2021
Aug 19, 2020 13:39
good one <a href="https://www.lyricsauto.com">lyricsauto</a>