jatpat / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

Commenting out #define IS_STOPWATCH_AVAILABLE breaks Unity3D web player #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Comment out #define IS_STOPWATCH_AVAILABLE as described in the Wiki for 
Unity3D
2. Create a Unity3D web player project and add the Lidgren DLL
3. Encounter failure to establish a client-server connection while using a DLL 
with the #define commented out.

What is the expected output? What do you see instead?
Commenting out #define IS_STOPWATCH_AVAILABLE seems to prevent a client-server 
connection from establishing. Leaving the #define uncommented allows the 
client-server connection to work correctly. Also, the Unity3D web player 
project compiles successfully regardless if the #define is present or not. 

What version of the product are you using? On what operating system?
Lidgren @ rev 284, Unity3D 3.3.0f4, MacOSX 10.6

Please provide any additional information below.
The older Unity3D 2.6 used an older version of Mono that did not implement the 
Stopwatch class. Current versions of Unity3D (3.0+) support the Stopwatch class 
since they are now using Mono 2.6 which is roughly equivalent to .NET 3.5. 

I didn't have much time to look into the issue, so I'm not sure why a 
client-server connection is failing to establish when the #define is commented 
out and Lidgren falls back to using Environment.TickCount, but I did narrow it 
down to just this #define causing the problem. This issue might be specific to 
either Mono 2.6 or MacOSX.

I would recommend changing the wiki to instruct commenting out #define 
IS_STOPWATCH_AVAILABLE only for older Unity3D versions before 3.0, and to leave 
it enabled for newer 3.0+ versions.

Original issue reported on code.google.com by jhill...@gmail.com on 21 Jun 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Wiki page fixed

Original comment by lidg...@gmail.com on 18 Jul 2011 at 8:54