Open Willco2 opened 1 month ago
Weren't these functions added recently for emission within models for particle emitters? I don't actually see a problem for purposes like that having that disparity.
If any of the particle code is running in an async and/or an inconsistently ordered context (I remember there were issues with script ordering at some point) then having ThreadSafeRandom
as opposed to Random
would be preferrable.
It seems like it's necessary to have those methods written that way to facilitate that functionality?
There can be valid reasons to have two methods in practice, but the decision to use Random.Shared
doesn't seem to be done haphazardly.
What it is?
Color.Random
usesSandboxSystem.Random
that can be manually seeded by user code when needed.Sphere.RandomPointOnEdge
usesRandom.Shared
instead, which can't. There are probably more examples as well.What should it be?
Use
SandboxSystem.Random
across all helper functions, so manually setting a seed actually works.