Answer the question
In order to leave comments, you need to log in
How to access a child object and get the data of the script hanging on it?
How to access a child object and get the data of the script that hangs on it? The object is inactive.
Through gameObject.Find does not see.
private TextBehavior textScript;
private void Start()
{
textScript = GameObject.Find("TargetText").GetComponentInChildren<TextBehavior>();
textScript.UpdateScore();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question