You can Shuffle List in Unity using LINQ

preview_player
Показать описание
If you need to 𝗦𝗵𝘂𝗳𝗳𝗹𝗲 / 𝗥𝗮𝗻𝗱𝗼𝗺𝗶𝘇𝗲 a list of items you can use 𝗟𝗜𝗡𝗤! 🙂👍

Just remember that it 𝗿𝗲𝘁𝘂𝗿𝗻𝘀 a new shuffled collection! 😉

#shorts #unitytips #gamedev #unity2d #csharp
Рекомендации по теме
Комментарии
Автор

Wouldn't be better to create 2 lists, adding the cards to the first list and pick at Random from the List to the other list, returning the other list if the first list is empty?

NickkSA
Автор

is your game 2d but uses 3d cards to get the effect of it looking 3d when you rotate the cards across they/x axis? im trying to add something like this to my game is there any way you could help with that?

Qyubij
Автор

Only use this for smaller lists as it creates two additional lists and temporary objects that take up resources. It's a simple method but as with everything, you pay for simplicity in other ways.

NoTimeLeft_