'Instantiated Text mesh pro game object appears with no opacaty

I am working on a game where I need to Instantiate TMP text as a gameobject (tried instantiating as TMP text but wouldn't appear in the list where I add the objects). I change the text value while instantiating and that works but even though the prefab text has max opacity the text appears with 0 opacity. Thank you in advance for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source