I\'m Using unity for developing my game. I\'ve created a simple game just like football after scoring a goal the ball should be destroyed and then reappear at its original p
You can try respawning the object by using this script -
using UnityEngine;
using System.Collections;
public class copy : MonoBehaviour
{
[SerializeField]
private GameObject prefab = null; // assign Cube prefab to this in Editor
void Start()
{
// no need for a local prefab variable, nor a call to Resources.Load();
for (int i = 0; i < 4; ++i)
{
Instantiate(prefab, new Vector3(0, i * 10, 0), Quaternion.identity); // you can directly assign position in Instantiate
}
}
}