1月 122019
myCapsule = GameObject.FindGameObjectWithTag (“MyCapsule”);
// 親のGameObjectからTransform.Find
// 非アクティブでも取得可能
mainCamera = myCapsule.transform.Find(“Camera”).gameObject;
diveCamera = myCapsule.transform.Find(“Dive_Camera”).gameObject;
if (mainCamera != null) {
mainCamera.SetActive (true);
}
if (diveCamera != null) {
diveCamera.SetActive (false);
}