cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Integrations v47.0 bug report

marcin.dwornikowski
Honored Guest

Hi, I've a simple bug to report

I can't seem to find a way to report bugs regarding Oculus Integrations package for Unity so I report it here:

Screenshot_57.png

The script AudioTrigger from the package contains this line of code

which sets the UnityEngine.Random seed to (int)Time.time value

So, this means that the UnityEngine.Random seed is overriden by that script on AudioTrigger initialisation. If Oculus stuff is active in the scene on Startup (usually it is), then the random seed value will be overriden by that line on Start, always with value of 0, resulting in our app UnityEngine.Random calls always returning same values.

 

Usually developers set the seed themselves or leave it up to UnityEngine to set (it's set earlier than when the AudioTrigger script does it), but because this line exists, it is very likely that this seed value will be overriden with 0 (or with time in second afer Oculus stuff is initialised in the scene, if you activate Oculus stuff after let's say one second, then the seed will be 1).

Such thing shouldn't occur. Tool developers should leave the random seed initialisation up to app developers or to the UnityEngine.

To fix this - simply removing that line from upcoming releases will fix the problem, then the seed will be randomly applied by the engine on app startup or by the app developers if they have their own seed initialisation.

 

Regards to Oculus tools developers.

 

0 REPLIES 0