A picture from Hierarchy :
I instantiate the SlateUGUI prefab and then later tried to access the highlitged gameobject 'TextDebug' using :
TextMeshProUGUI text1 = SlateInstant.transform.Find("TextDebug").GetComponent<TextMeshProUGUI>();
text1.text = "This works";
However, it does not work : Error : NullReferenceException: Object reference not set to an instance of an object
I am a bit skeptical to use GetComponentInChildren<>()
as it can be seen from the hierarchy it is quite a lot of children and sub-children.