UE5 - Shuffle an Array Using RandomStream

Опубликовано: 08 Май 2023
на канале: Logan Smith
2,020
35

RandomStream is a super useful tool in Unreal Engine for generating reproducible random numbers from a single seed. But it doesn't come out of the box with a way to shuffle an array (or vector, or other random-access container). Here I show how to adapt it to the C++11 Uniform Random Bit Generator named requirement so that it can be used directly with C++11's std::shuffle algorithm. Hope you enjoy weeds, because we'll be diving into some.

Blueprint-only version:    • UE5 - Shuffle Using RandomStream (Blueprin...  

Amazing, extensive tour of the C++ "random" header    • CppCon 2016: Walter E. Brown “What C++ Pro...  

FRandomStream docs - https://docs.unrealengine.com/5.1/en-...

URBG docs - https://en.cppreference.com/w/cpp/nam...

std::shuffle docs - https://en.cppreference.com/w/cpp/alg...


На этой странице сайта вы можете посмотреть видео онлайн UE5 - Shuffle an Array Using RandomStream длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Logan Smith 08 Май 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,020 раз и оно понравилось 35 зрителям. Приятного просмотра!