public static void ChangeLayersRecursively(Transform trans, string name)
{
trans.gameObject.layer = LayerMask.NameToLayer(name);
foreach (Transform child in trans)
{
ChangeLayersRecursively(child, name);
}
}
댓글 없음:
댓글 쓰기