본문 바로가기

전체 글

(27)
자바스크립트 팁 (1) - 배열 안에 배열 저장 자바스크립트에서 배열 안에 또 다른 배열을 저장하고 싶을 때 배열에 그냥 다른 배열을 넣게되면 앞에 넣었던 배열도 나중에 넣은 배열과 같게 됩니다. 하지만 정말 간단하게 고칠수가 있더라구요. 바로 array.flat([])을 사용하는건데 다음과 같이 바꿔 봅시다. 위와 같이 배열 안에 넣을 또 다른 배열을 .flat을 이용하여 넣어주면 문제 없이 들어간걸 볼 수 있습니다!
Starting TCP by Unity (3) - Practice In this time, we will send and receive data between Server and Client. Now let's try with clicking a button info to send and receive. Right click on Hierarchy to create a Button. And then right click again in Assets/Scripts to create a script named as ButtonControl. Then put the script into an empty object named ButtonControl. And put a simple code as above. Follow the steps I wrote to put the f..
Starting TCP by Unity (2) - Client 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..
Starting TCP by Unity (1) - Server I'm going to make a server with C# first then make Client with Unity to connect to the Server. So let's make Server part first. https://github.com/SoftwareDevJake/TCPServer GitHub - SoftwareDevJake/TCPServer Contribute to SoftwareDevJake/TCPServer development by creating an account on GitHub. github.com Get files from about by using "git clone" After you get all of them, just simply open Console..
Unity tips for Beginner (2) - Dealing with static string and int This tip is connectable with my first tip and every developers sholud know about this tip! When a developer writes some codes, there are some static string or int. It's easy to take care of the whole codes by doing this. Because I announced it with static, I don't need to put this script into the code where I need it!
Unity tips for Beginner (1) - StreamingAssets Some parts you may need to change after you build your project. So This is a simple code for reading some data from txt file. Put them into a txt file inside of StreamingAssets folder. Here is what I did for my project. I needed to change IP and PORT number so I made it in this way before I build it. Line 1 : Explanation for Line2 Line 2 : Value explained from Line 1 Line 3 : Explanation for Lin..
유니티 TCP 시작하기(3) - 응용 이번엔 앞서 만든 서버와 클라이언트를 활용하여 추가로 보내고 싶은 데이터를 선정하여 주고 받을 겁니다. 먼저 클라이언트인 유니티에서 버튼을 만들어 버튼이 눌렸다는 정보를 주고 받아 봅시다! Hierarchy에서 우클릭으로 UI -> button을 생성합니다. 그리고 또 다른 Create Empty로 ButtonControl이라는 이름으로 오브젝트를 만든 후 Project의 Assets/Scripts 안의 폴더에 마우스 우클릭을 통해 Create -> C# Script를 생성해줍니다. 그 후 저번과 같이 스크립트를 드래그하여 ButtonControl 오브젝트에 넣어줍니다. 위와 같이 생성한 스크립트에 간단한 함수를 만들어 줍니다. 위 사진의 순서에 따라 버튼에 OnClick 함수 구간에 ButtonCont..
유니티 TCP 시작하기(2) - Client 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 위를 통해 서버를 만들었다면 이번엔 유니티를 클라이언트로 만들어 위의 서버에 접속을 시킬겁니다. https://github.com/SoftwareDevJake/TCPClient GitHub - SoftwareDevJake/TCPClient Contribute to SoftwareDe..