I have a Herb collection to spawn from some bushes in the forest in my 2D game. The script I have has functions to clone Herbs prefabs, but nothing happens when I press on the bush. What is the issue here:
Script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
public Transform[] spawnLocations;
public GameObject[] whatToSpawnPrefab;
public GameObject[] whatToSpawnClone;
void spawnSomethingAwesomePlease()
{
whatToSpawnClone[0] = Instantiate(whatToSpawnPrefab[0], spawnLocations[0].transform.position, Quaternion.Euler(0,0,0)) as GameObject;
}
}
