Дописывание скрипта рандомайза объектов

This commit is contained in:
2025-01-29 10:30:00 +03:00
parent 802960ab9b
commit ccd02360e9
3 changed files with 21 additions and 192 deletions

View File

@ -59,7 +59,9 @@ public class SpawnRandomObjectsScript : MonoBehaviour
);
// Инстанцируем объект с случайным поворотом
Instantiate(prefab, point.Position, randomRotation);
Transform child = Instantiate(prefab, point.Position, randomRotation).transform;
child.SetParent(transform);
}
}