A lightning-fast random number generator suite for Unity. Utilizing Burst/Job, Compute Shaders, and Rust, it empowers massive batch generation and simulations.Unlock unprecedented random generation speeds for your Unity projects. **Ultimate RNG** is designed from the ground up to solve the bottleneck of massive batch generations. By utilizing three powerful backends—Unity's C# Job System (Burst Compiler), Compute Shaders for GPU offloading, and highly optimized Rust native plugins—you can generate millions of random numbers in a fraction of a millisecond.This package provides a wide array of state-of-the-art RNG algorithms, including Xoshiro256, Philox, Mersenne Twister (MT19937, SFMT), SFC64, PCG32x8, and more, allowing you to choose the exact balance between blinding speed and cryptographic-like quality.**Perfect for:**- Procedural Terrain & World Generation- Complex Particle Systems and VFX- Large-scale simulations (flocking, traffic, fluid dynamics)- Machine Learning and Monte Carlo simulations within Unity- Any Data-Oriented (DOTS) workflow demanding heavy random sampling- **Blazing Fast Performance**: Achieve up to ~256x faster generation speeds compared to standard `System.Random` and ~209x compared to `UnityEngine.Random`. Native plugins leverage **AVX-512** SIMD instructions and parallel processing for next-generation CPU performance on supported hardware.- **Multiple Backends**: - **Job System / Burst Compiler**: Native C# high-speed generation (SplitMix, Philox32x4, Pcg32, Mt19937). - **Compute Shader**: Direct-to-GPU generation (Philox32) for zero CPU overhead. - **Rust Native Plugins**: The absolute gold standard in statistical quality and performance (MT19937, SFMT, SFC64, PCG32, Xoshiro256, Pcg32x8, etc.). Features **SIMD Auto-Dispatching** to automatically detect and utilize **AVX-512**, AVX2, or SSE for maximum throughput on any machine. Internal state is securely initialized using SplitMix32/64.- **Data-Oriented Design**: Built natively for use with `NativeArray`, `Span`, and the Unity Job System.- **Unified Interface**: Clean, consistent API whether generating from Jobs, Compute Shaders, or Native Plugins.- **Probability-Weighted Selection**: `ProbabilityList` provides a weighted random selection system with Inspector integration, batch picking via any `IRng32` generator, and extension methods (`Filter`, `MapValue`, `Top`, `AdjustByLevel`, `Shuffle`). Ideal for loot tables, spawn odds, and non-uniform distributions.- **Extensive Benchmarks**: Comes with an integrated Demo scene to benchmark the performance in your own specific environment.**Included Algorithms & Utilities:**- Xoshiro256++ / Xoshiro256**- Jsf32- Philox32 / Philox64- Mersenne Twister (Mt19937 / Mt19937-64 / Sfmt19937 / Sfmt19937-64)- Sfc64- SplitMix32 / SplitMix64- Pcg32 / Pcg32x8- Xorshift variants- Squares32x8- Threefry32- Cet256 / Cet64- ProbabilityList (weighted selection utility)I used AI to fix code, debug it, and create documentation.




