Local Device Finder
Local Device Finder detects devices on your local network by sending UDP broadcast and multicast discovery messages. Supports both Editor and Runtime modes with customizable responses, multicast for reduced network load, and individual device communication. Includes samples for testing and validation.
com.afjk.local-device-finder Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/local-device-finder.git?path=Packages/com.afjk.local-device-finder README Markdown
Copy this to your project's README.md
## Installation
Add **Local Device Finder** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/local-device-finder.git?path=Packages%2Fcom.afjk.local-device-finder
```
[](https://www.pkglnk.dev/pkg/local-device-finder)README
Local Device Finder
日本語 | English
Local Device Finder is a C# library for detecting devices on a local network. It sends discovery messages using UDP broadcast and multicast, then waits for responses from the devices.
Features
- Detect devices on the local network.
- Works in both Editor and Runtime modes.
- If ports are set up properly, it is possible to test both sending and receiving on a single PC.
- Responses are customizable. In the sample, only the device name is returned as a response, but you can add any information to the response.
- Supports both UDP broadcast and multicast, with multicast reducing network load.
- It is possible to send data individually to detected devices.
Installation
Install via OpenUPM
To install the Local Device Finder package using OpenUPM, run the following command in your project’s root folder:
openupm add com.afjk.local-device-finder
Install via Unity Package Manager (UPM)
To install the Local Device Finder package using Unity Package Manager, follow these steps:
Using Scoped Registries
- Open your project’s manifest.json file.
- Add the following scoped registry configuration:
"scopedRegistries": [
{
"name": "afjk's UPM registory",
"url": "https://upm.afjk.jp",
"scopes": [
"com.afjk"
]
}
]
- Save the file.
- In UnityEditor, go to Window > Package Manager.
- Select the My Registries section in the left panel.
- Search for Local Device Finder and install it.
Using Project Settings
Alternatively, you can configure the registry via Project Settings:
- In UnityEditor, go to Edit > Project Settings > Package Manager.
- Under Scoped Registries, add the following details:
- Name: afjk’s UPM registory
- URL: https://upm.afjk.jp
- Scopes: com.afjk
You can now find and install Local Device Finder in the Package Manager.
Install from Git URL
Alternatively, to install the Local Device Finder package using Unity Package Manager, follow these steps:
- In UnityEditor, go to Window -> Package Manager.
- Click the + button in the top left.
- Select "Add package from git URL..."
- Paste the following URL and press Enter.
https://github.com/afjk/LocalDeviceFinder.git?path=/Packages/com.afjk.local-device-finder#v0.0.1
Samples
Import the Local Device Finder samples from the Package Manager.
Editor Sample
LocalDeviceFinderEditor and LocalDeviceResponderEditor are samples for testing device detection and response within the Unity editor.
To open these editor windows, in UnityEditor, click Tools > Local Device Finder > Finder or Tools > Local Device Finder > Responder.
Runtime Sample
LocalDeviceFinderClient and LocalDeviceResponderClient are samples for detecting devices and responding at runtime.
These classes can be attached to Unity game objects for use.
The sample scene Assets/Samples/Local Device Finder/0.0.1/Sample/Demo/Demo.unity includes an example using these classes.
No comments yet. Be the first!