Unity3D/Tips

[펌] How to get IP addresses of all devices in local network with Unity UNET in C#?

blueasa 2018. 2. 5. 14:13
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Tools : MonoBehaviour {

    //get local ip address
    public string getIP() {

        string IP = "";

        IP = Network.player.ipAddress; <--- this

        return IP;
    }

    //get all ip addresses in local network
    public List<string> getIPArray() {

        List<string> listIP = new List<string>();


        return listIP;
    }
}



[출처]

https://stackoverflow.com/questions/37951902/how-to-get-ip-addresses-of-all-devices-in-local-network-with-unity-unet-in-c


[참조] http://www.devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=29214

반응형