if you want to get the parent object name means,
Assume,your parent object name as, Man....it have child name as hand...
it'll give your parent Object name as man....it'll really helpful when you find objects name in runtime.
Assume,your parent object name as, Man....it have child name as hand...
GameObject ParentName = GameObject.Find("hand").transform.parent.gameObject;
Debug.Log("parent name : "+ParentName.name);
it'll give your parent Object name as man....it'll really helpful when you find objects name in runtime.
No comments:
Post a Comment