Closed tarunkhatri closed 4 years ago
Seems like you have looked at the old docs. the Networking.Host etc is from Forge Classic. Have a look at the wiki on this repository to get started. Also, please join the Discord if you like, as that's were most realtime support happens
I am trying to make linux executable headless server file but i am facing this error - "The type or namespace name 'Networking' could not be found (are you missing a using directive or an assembly reference?)"
I am using Unity 2018.4.9 Personal edition. I have successfully made Moving Cube example but not able to make Linux Server file. Please help me.
My Code
`using UnityEngine; using BeardedManStudios.Network; using BeardedManStudios.Forge.Networking;
if UNITY_EDITOR && !UNITY_WEBPLAYER
using System.Collections;
endif
namespace BeardedManStudios.Network.Unity { public class StartHeadlessLinux : MonoBehaviour { public string host = "127.0.0.1"; // IP address public int port = 15937; // Port number public Networking.TransportationProtocolType protocolType = Networking.TransportationProtocolType.UDP; // Communication protocol public int playerCount = 31; // Maximum player count -- excluding this server public string sceneName = "Game"; // Scene to load public bool proximityBasedUpdates = false; // Only send other player updates if they are within range public float proximityDistance = 5.0f; // The range for the players to be updated within
if UNITY_EDITOR
endif
}`