I’m trying to get my cards to stack up in one spot, I can’t seem to get them to all line up on top of the spawn spot.
public RectTransform deckSpawn;
for (int i = 0; i < shuffled_deck.Count; i++)
{
GameObject playableDeck = (GameObject)Instantiate(shuffled_deck[i]);
playableDeck.transform.SetParent(deckSpawn.transform);
}
I tried that it didn’t work, unity doesn’t recognize ‘card thickness’ haha… thats the first thing i tried before just without card and put 0f instead, didn’t work still
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
Is they a way I can get it so i can spawn each card .1 above each other as they spawn in the same spot now