Giter VIP home page Giter VIP logo

fish-networking-discovery's Introduction

Fish-Networking-Discovery

A very simple LAN network discovery component for Fish-Networking (Asset Store | GitHub)

Getting Started (GUI)

  1. Download the code in this repo as a zip
  2. Extract the code inside your project folder (FISH-NETWORKING MUST BE ALREADY INSTALLED)
  3. Create an empty game object
  4. Add a NetworkManager component to the game object you just created
  5. Add a NetworkDiscovery component to the game object you just created
  6. Set the secret, port, discoveryInterval, and optionally the serverName fields
  7. Add a NetworkDiscoveryHUD component
  8. Enter play mode
    • If you want to begin advertising a server
      1. Press "Start" under the "Server" group
      2. 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

Getting Started (Code)

  1. Download the code in this repo as a zip
  2. Extract the code inside your project folder (FISH-NETWORKING MUST BE ALREADY INSTALLED)
  3. Create an empty game object
  4. Add a NetworkManager component to the game object you just created
  5. Add a NetworkDiscovery component to the game object you just created
  6. Set the secret, port, and discoveryInterval fields
  7. Enter play mode
    • If you want begin advertising a server
      1. Call InstanceFinder.ServerManager.StartConnection()
      2. Call FindObjectOfType<NetworkDiscovery>().StartAdvertisingServer()
    • If you want to stop advertising a server
      • Call FindObjectOfType<NetworkDiscovery>().StopAdvertisingServer()
    • If you want to start searching for servers
      • Call FindObjectOfType<NetworkDiscovery>().StartSearchingForServers()
    • If you want to stop searching for servers
      • Call FindObjectOfType<NetworkDiscovery>().StopSearchingForServers()

Planned Features

  • Automatically start/stop advertising server
  • Automatically remove servers that are no longer alive
  • Introduce Unity coroutines for all NetworkDiscovery methods

Donating

If you found my project helpful, I would greatly appreciate your support through a donation to help me continue improving and maintaining it!

fish-networking-discovery's People

Contributors

abdelfattahradwan avatar maxkratt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.