UnityBiz/Create.cs
meteor 6aa72edd9a k
k
2024-10-21 12:10:41 +02:00

18 lines
431 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Create : MonoBehaviour
{
public GameObject[] objectToSpawn;
public int z,y;
// Start is called before the first frame update
void Start()
{
int rand = UnityEngine.Random.Range(0, objectToSpawn.Length);
Instantiate(objectToSpawn[rand], new Vector3(y,0,z), Quaternion.identity);
}
}