Hello, i want to write a random spawn script, can somebody help ?

Im planing to create a script that picks the items from database and distributes them to different specific locations on the map but the script should count the amount of items while distributing them.Suppose i have 2 yellow , 5 blue and 3 red card, script should distribute as many cards as there are on the database.How can i do that ?

Definitely start with any one of the bazillions of Youtube tutorials out there, rather than one of us typing (and mistyping) all the many steps between code and scene setup required.

6933480--814266--Screen Shot 2021-03-14 at 7.00.22 AM.png

The problem is not picking random card, it is distributing them with quantity limit to specific locations in 3d world. Thanks for kindness though.

Put blank GameObjects where they’re supposed to be, then spawn the cards and move them there.

I have done this for Poker, Blackjack, Solitaire… just about any kind of board layout. It’s just a board layout, and then some kind of manager that iterates through them all according to whatever game rules you have.