hi,
i have a script to instantiate objects one below the other, but my script works instantiates objects at the same place. need help in this.
using UnityEngine;
using System.Collections;
public class eventManager_2 : MonoBehaviour {
public GameObject cardPrefab;
// Use this for initialization
void Start () {
cardCreation ();
}
// Update is called once per frame
void Update () {
}
void cardCreation()
{
for(int i = 1; i < 10; i++)
{
//for(int j = i; j > i; j++)
//{
GameObject cardsTemp = (GameObject)Instantiate(cardPrefab, transform.position, transform.rotation);
cardsTemp.transform.position = new Vector3(transform.position.x ,(transform.position.y - 0.5f),0);
//}
}
}
}