2.3 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.3 KiB
		
	
	
	
	
	
	
	
Fish-Networking-Discovery
A very simple LAN network discovery component for Fish-Networking (Asset Store | GitHub)
Getting Started (GUI)
- Download the code in this repo as a zip
- Extract the code inside your project folder (FISH-NETWORKING MUST BE ALREADY INSTALLED)
- Create an empty game object
- Add a NetworkManagercomponent to the game object you just created
- Add a NetworkDiscoverycomponent to the game object you just created
- Set the secret,port, anddiscoveryIntervalfields
- Add a NetworkDiscoveryHUDcomponent
- Enter play mode
- If you want to begin advertising a server
- Press "Start" under the "Server" group
- Press "Start" under the "Advertising" group
 
- If you want to stop advertising a server
- Press "Stop" under the "Advertising" group
 
- If you want to begin searching for servers
- Press "Start" under the "Searching" group
 
- If you want to stop searching for servers
- Press "Stop" under the "Searching" group
 
 
- If you want to begin advertising a server
Getting Started (Code)
- Download the code in this repo as a zip
- Extract the code inside your project folder (FISH-NETWORKING MUST BE ALREADY INSTALLED)
- Create an empty game object
- Add a NetworkManagercomponent to the game object you just created
- Add a NetworkDiscoverycomponent to the game object you just created
- Set the secret,port, anddiscoveryIntervalfields
- Enter play mode
- If you want begin advertising a server
- Call InstanceFinder.ServerManager.StartConnection()
- Call FindObjectOfType<NetworkDiscovery>().StartAdvertisingServer()
 
- Call 
- If you want to stop advertising a server
- Call FindObjectOfType<NetworkDiscovery>().StopAdvertisingServer()
 
- Call 
- If you want to start searching for servers
- Call FindObjectOfType<NetworkDiscovery>().StartSearchingForServers()
 
- Call 
- If you want to stop seaching for servers
- Call FindObjectOfType<NetworkDiscovery>().StopSearchingForServers()
 
- Call 
 
- If you want begin advertising a server
Planned Features
- Automatically start/stop advertising server
- Automatically remove servers that are no longer alive
- Introduce Unity coroutines for all NetworkDiscoverymethods