Unity (13) 썸네일형 리스트형 Unity Error without specific reason - it works but has red lines on visual studio files As you can see from the picture above, sometimes it happens like that. Usually, it happened after unzipping the zipped file and reopening the project. It's so simple to fix this problem. Turn off the project you have a problem with. Get into the project location and delete "TestDelegate.sln" file. Then, re-open the project from unity and double click on "delegateTest" file. And it fixes the prob.. A method as a parameter - how to use Delegate I was thinking about "would it be possible to use a method as a parameter?". And actually, it was possible in JS but in C# it didn't work to pass a method right away. So I found a way to do it in C# and it's called delegate. Let's give it a try passing a method as a parameter. As on the 8th line, declare a variable as a delegate. (delegateTestFunc) The important thing to remember when you declar.. 유니티 알 수 없는 에러 꿀팁 - 실행은 되는데 유니티에 해당되는 부분 빨간줄 위처럼 빨간줄은 뜨는데 정작 유니티 실행에는 문제 없던 적 있나요? 보통 유니티 프로젝트를 압축한 뒤 다른 곳에서 열면 위와같은 현상이 일어나는데요. 해결 방법은 정말 간단합니다. 먼저 visual studio는 꺼줍니다. 해당 프로젝트 폴더에 들어가서 가장 아래의 TestDelegate.sln 파일을 삭제하고, 유니티에서 해당 스크립트를 찾은 뒤 더블클릭하면 새로 파일이 생깁니다. 그럼 문제는 해결 되죠! 유니티 함수 전달 - Delegate 사용법 유니티를 사용하다 문득 함수를 매개변수로 넣어줄 수 없을까? 싶어서 찾다가 Delegate를 찾았습니다. 자바스크립트에서는 그냥 함수를 매개변수로 넣을 수 있지만 C#에서는 안되더군요. 그래서 Delegate를 이용하여 C#에서 함수를 매개변수로 전달하는 법을 알아봅시다. 먼저 8번 줄에 delegate를 선언 합니다. (delegateTestFunc) delegate 선언시에 주의할 사항은 리턴값, 매개변수가 delegate에 넣을 함수와 같은 형태여야 합니다. 즉 위의 예시에서는 testFunc의 리턴값과 매개변수가 delegate 선언과 같은 형태로 쓰여진걸 볼 수 있습니다. delegate 선언이 끝났으면 delegate에 담을 함수 또한 같은형태로 만들어 주고 delegate를 매개변수로 전달하.. 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.. 이전 1 2 다음