public RectTransform prefabdeck;
public GameObject spawnSpot;
public Transform c;
// Update is called once per frame
public void OnClicked () {
Transform deck = Instantiate(prefabdeck[i], spawnSpot.transform.position, Quaternion.identity) as Transform;
deck.transform.SetParent(c, true); // -- C is Canvas which the card becomes child of
how would i make each card spawn say .1 above each other so when they are dragged it doesn’t move other cards too.
it’s going to be a little tricky to know what other cards exist from a stand alone function like that… you might be able to get the childcount of “c” and work with that. But the basic “how to change the spawn position” would be
That seems to move the position of where it’s spawned but it’s not making a pile of cards, think it needs to add .1f to each of the cards spawned… not sure how id do that lol.