public void SetHandCardsRaycasts(bool value) { foreach (Transform c in myHand.transform) { DraggableCard card = c.GetComponent <DraggableCard>(); if (card != null) { card.SetRaycast(value); } } }