Transform cloneTransform = m_fields.GetChild(nColumn).GetChild(nIndex);
Transform tempTransform = Instantiate(cloneTransform).transform;
tempTransform.SetParent(m_fields.GetChild(nColumn));
tempTransform.localPosition = Vector3.zero;
tempTransform.localRotation = Quaternion.identity;
tempTransform.localScale = Vector3.one;
Answer:
Transform tempTransform = GameObject.Instantiate(cloneTransform).transform;
沒有留言:
張貼留言