18 lines
431 B
C#
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);
|
|
}
|
|
}
|