-
Notifications
You must be signed in to change notification settings - Fork 331
Unity3D
Steps to use this library with Unity
- Define the constants
__CONSTRAINED__
andUNITY
in the project. - Add the Unity Reference to the solution located at Unity/Editor/Data/Managed/UnityEngine.dll
- Change the target framework to "Unity 3.5 .net Subset Base Class Libraries"
- Build the solution to generate the dlls. You will find them inside "Lidgren.Network/bin/Debug" or "Lidgren.Network/bin/Release"
- Copy the files inside /bin/Release or /bin/Debug (Lidgren.Network.dll, Lidgren.Network.XML, Lidgren.Network.pdb) to the folder Assets/Assemblies/Lidgren of your Unity Project. Create the folders if they don't exist. Also put a copy of the LICENSE file in that folder. Looking inside the Project window in unity must show the folder Assemblies.
On the window Solution Explorer window right click on Lidgren.Network > Properties, Build, and type on "Conditional compilation symbols":
UNITY __CONSTRAINED__
On the window Solution Explorer window expand Lidgren.Network, right click on References > Add Reference..., Click Browse..., go to Unity/Editor/Data/Managed/UnityEngine.dll and click on Add
On the window Solution Explorer window right click on Lidgren.Network > Properties, Application, and change "Target framework"
Select "Debug" or "Release" on the drop down menu near the Start button, then on the Solution Explorer window right click on Lidgren.Network > Build
On the Solution window right click on Lidgren.Network > Options, Build, Compiler, and type on "Define Symbols":
UNITY __CONSTRAINED__
On the window Solution window expand Lidgren.Network, right click on References > Edit References... > .Net Assembly, Click Browse..., go to Unity/Editor/Data/Managed/UnityEngine.dll and click on Open
On the Solution window right click on Lidgre.Network > Options, Build, General, and change "Target framework"
Select "Debug" or "Release" on the drop down menu near the Play button, then on the Solution window right click on Lidgren.Network > Build