void Start() { myGod = GameObject.FindGameObjectWithTag("God"); scGod = myGod.GetComponent <sc_DialogGod> (); scTalk = GetComponent <sc_talkNPC> (); DialogObj = transform.GetChild(1).gameObject; myDialog = DialogObj.GetComponentInChildren <Text>(); tr_DialogBox = DialogObj.transform.GetChild(0); tr_DialCanvas = DialogObj.transform.GetChild(1); tr_BoxOutline = DialogObj.transform.GetChild(2); tr_MyDialog = tr_DialCanvas.GetChild(0).GetComponent <RectTransform> (); scOutline = tr_BoxOutline.GetComponent <sc_BoxOutline> (); spr_DialogBox = tr_DialogBox.GetComponent <SpriteRenderer> (); boxColor = spr_DialogBox.color; scGod.NpcRegister(myName, this); cam = Camera.main; tr_DialogBox.gameObject.SetActive(false); DialogObj.SetActive(false); }