https://soja-dev.tistory.com/4
유니티 TCP 시작하기(1) - Server
먼저 C#을 활용하여 Server를 만든 후 유니티를 활용하여 Client로써 Server에 접속할 것이다. 그럼 먼저 Server를 만들어 보자. https://github.com/SoftwareDevJake/TCPServer GitHub - SoftwareDevJake/TCPServ..
soja-dev.tistory.com
If you completed making a server by above, then now let's make a client to connect to it
https://github.com/SoftwareDevJake/TCPClient
GitHub - SoftwareDevJake/TCPClient
Contribute to SoftwareDevJake/TCPClient development by creating an account on GitHub.
github.com
Again we get files from git clone.
And create a new project from Unity.
After that, put all the files you've got into Assets/Scripts/.
(You can create a new Scripts folder to put them in or simply drag w
hat you downloaded into Assets folder.
And use Create Empty in Unity Scene for creating Client, SocketServer, ThreadManager.
(Right click on your mouse in Hierarchy and find Create Empty.)
Drag Client script into the Client object,
SocketServer script into SocketServer object,
ThreadManager script into ThreadManager object.
Make sure if you have same IP and Port number as Server.
Start Server first then start Unity, and you'll see the connected result as above!
'Unity' 카테고리의 다른 글
A method as a parameter - how to use Delegate (0) | 2023.01.24 |
---|---|
Starting TCP by Unity (3) - Practice (0) | 2022.10.26 |
Starting TCP by Unity (1) - Server (0) | 2022.10.26 |
Unity tips for Beginner (2) - Dealing with static string and int (0) | 2022.10.26 |
Unity tips for Beginner (1) - StreamingAssets (0) | 2022.10.26 |