InRoomTime sometimes starts with random time
Options
moofly
✭
Sometimes when a client creates a room, and is therefore MasterClient, the InRoomTime.cs holds invalid values, rather than zero if it's not ready. Sometimes InRoomTime.RoomTimestamp is set to 1.5bn or something random, and I've just left the room running for a while and this timestamp is never corrected. I don't know if it's just failing to set or detect changes to custom properties, but I was expecting the value of InRoomTime.RoomTimestamp to be near zero as the script promises.
It only happens sometimes - perhaps 1 in 5 times a client creates a new room. Any ideas how to track down what is happening?
It only happens sometimes - perhaps 1 in 5 times a client creates a new room. Any ideas how to track down what is happening?
0
Comments
-
Any ideas? I'd say 1 in 4 rooms are doing this, actually.0
-
Hi,
1.5bn ? is it not rather a float approximation of 0, which sometimes reads like a large number, but actually is a very small number.
http://answers.unity3d.com/questions/599493/getting-1025547e-07-insead-of-zero-why.html
You should try to use https://docs.unity3d.com/ScriptReference/Mathf.Approximately.html to check if it's 0 or close.
Bye,
Jean0