Hello,
I have a script named CloseTutorialTower located on Quit child.
OtherParents
=> Tutorial
=>=>InGameTutorial
=>=>=>RPGDialog
=>=>=>=>Quit
I use the following code to access the script :
GameObject rpgDialog = GameObject.Find("Tutorial");
Debug.Log(rpgDialog);
CloseTutorialTower zaScripts = rpgDialog.GetComponentInChildren<CloseTutorialTower>();
zaScripts.OnClick();
But, even though it find the object Tutorial, it does no find the script on the childrent of Tutorial.
What am I doing wrong ?
Thanks