public void RenderCards(List <Card> hand) { if (cardRenderObjects == null) { InitializeCardRenderObjects(); } Debug.Log("Rendering " + hand.Count.ToString() + " cards for player."); for (int i = 0; i < GameConstants.MAX_HAND_SIZE; i++) { GameObject cardRenderObject = cardRenderObjects[i]; if (i < hand.Count) { cardRenderObject.SetActive(true); DraggableCard dragableCardHandler = cardRenderObject.GetComponent <DraggableCard>(); dragableCardHandler.cardThisRenders = hand[i]; dragableCardHandler.UpdateCardDisplay(); dragableCardHandler.enabled = cardsDraggable; } else { cardRenderObject.SetActive(false); } } }