목록오류 (3)
A-Dyu의 개발 일기장
이 오류는 생성한 대리자와 인수 개수가 일치하지 않아 생긴 오류다.delegate string func(int i); //선언된 인수 1개의 대리자 internal class Program{ static void Main(string[] args) { func fun = (x, y) => $"{x}";//람다식의 인수가 2개라 오류 발생 fun(1, 2);//호출할 때 인수가 2개라 오류 발생 }}
리스트같이 인덱스로 접근하거나 합수로 접근하고 구조체의 값을 수정하려고 하니 이 오류가 뜬다.public struct MyStruct{ public string Name; public MyStruct(string name) { Name = name; }}internal class Program{ static void Main(string[] args) { List list = new List() { new MyStruct("ADyu") }; list[0].Name = "Name";//오류 발생 }}이 오류는 변수가 아닌 값을 수정하기 떄문인데,구조체같이 값 형식은 반환값을 불러올 때. ..

유니티를 사용하다가 이런 경고가 출력되었다. There are 2 event systems in the scene. Please ensure there is alway s exactly one event system in the scene 이건 뭐 말 그대로 현재 게임에 EventSystem이 2개 이상 있다는 뜻이다.혹여나 씬을 Additive시킬 때 이런 경고가 뜰 수 있으니 조심!