Closed IoannisKaragiannis closed 6 years ago
The class has been renamed to NetworkConfig, but you shouldn't need to use the class since it's serialized in the inspector. This, of course, applies to the latest commit of the master branch. Note, though, that the master branch has changed a lot since the latest release.
Hi Gabriel,
It seems that I have to build the library myself based on Albin's latest commits. Could you please help me on how to build the MLAPI library with VisualStudio? I have been using Eclipse and Linux for so many years that I have totally forgotten how to build libraries on Windows.
Thanks in advance.
Clone the repository or download it. Open the solution file, MLAPI.sln. In VisualStudio, near the top, there will be a drop-down that says Debug. Change that to Release. Then go to the Build menu and select Build Solution, or Ctrl+ Shift + B. After this is done, there will be a bin folder in root of the repository folder. Copy the contents of that folder to the Assets folder in your Unity project.
Hi,
I managed to build the MLAPI library. However, when I insert the MLAPI.dll in the Asset folder, it doesn't look as it should. In Albin's example, the MLAPI.dll file has a small arrow in the middle and it consists of 7 files (NetworkedAnimator, NetworkedBehaviour.cs, NetworkedNavMeshAgent, NetworkedObject, NetworkedTransform, NetworkingManager, TrackedObject). My MLAPI.dll doesn't consist of any further files in Unity. It looks empty although they have roughly the same size (90KB). So, I guess I'm building it wrong. Any suggestion?
Thanks.
Ok I fixed that. The problem was that I selected "Build MLAPI" instead of "Build Solution". Now the MLAPI.dll appears as it should in Unity. And I can also see it in the list when I try to add a component to an object. I also had to change Project Settings --> Player --> Configuration --> Scripting Runtime Version from Stable (.NET 3.5 Equivalent) to Experimental (.NET 4.6 Equivalent).
One more question now. Do I have to use the MLAPI_Editor? Cause when I try to do so, I get the following error:
"MLAPI.MonoBehaviours.Core.NetworkedObject" does not contain a definition for 'ServerOnly' and no extension method 'ServerOnly' of type 'MLAPI.MonoBehaviours.Core.NetworkedObject' could be found. Are you missing an assembly reference?"
Thanks!
You don’t need editor scripts. They are visual enhancements. The only one you ’need’ is the animator editor script. Otherwise the animator is hard to use.
Here it comes down to version missmatches
Closing. These issues should not be visible in the 1.0 version as it comes with Editor scripts and a installer.
Hi Albin,
I decided to start my own simple example from scratch to better understand MLAPI. For now I'm only having one cube as a prefab with the NetworkedObject component added, a NetworkManager object with the NetworkingManager component added and a HUD object with the NetManagerHub.cs script taken directly from your example in order to manage network configurations. However, I get the following error already:
Assets/NetManagerHud.cs(13,13): error CS0246: The type or namespace name 'NetworkingConfiguration' could not be found. Are you missing 'MLAPI.Data' using directive?
Any hint on what am I missing here?
Thanks.