728x90 목록244 1개의 Color Gradient를 구간으로 나누기 [SerializeField] Color color1; [SerializeField] Color color2; Color[] colors; float smoothness = 0; public void Function(int _length) { colors = new Color[_length + 1]; for(int i = 0; i < colors.Length; i++) { smoothness += 1f / colors.Length; colors[i] = Color.Lerp(color1, color2, smoothness); } } -참고영상 https://youtu.be/rj5wdmOY-8U 2022. 3. 17. Dictionary 배열 사용 Dictionary dic = new Dictionary(); KEY값 길이 - dic.Count(); KEY 0번의 배열 길이 - dic[0].Length; foreach(T t in T[KEY] { //t값 } 2022. 3. 15. Azure Kinect 참조하기 좋은 사이트 최초작성일 : 2022.02.22 최종수정일 : 2022.02.22 1. 공식 설명서 - https://docs.microsoft.com/ko-kr/azure/kinect-dk/ Azure Kinect DK 설명서 Azure Kinect DK는 정교한 컴퓨터 비전과 음성 모델을 제공하는 고급 AI 센서가 포함된 개발자 키트입니다. Kinect에는 깊이 센서, 비디오 카메라가 장착된 공간 마이크 배열 그리고 여러 모드, 옵션, SD docs.microsoft.com 2. 애저키넥트 c# 및 유니티 예제 영상 - https://youtube.com/playlist?list=PLrv3tbm13Fy1D-wNmJW2ngy0fqjeHXNKq AR Begginer - 애저 키넥트 키넥트 기초에 대해서 알아보자 www.. 2022. 2. 22. Azure Kinect 공식 예제 파일 최초작성일 : 2022.02.22 최종수정일 : 2022.02.22 https://github.com/microsoft/Azure-Kinect-Samples GitHub - microsoft/Azure-Kinect-Samples: Samples for Azure Kinect Samples for Azure Kinect. Contribute to microsoft/Azure-Kinect-Samples development by creating an account on GitHub. github.com 샘플 압축 파일을 다운로드후, 압축을 해제하고 Azure-Kinect-Samples/body-tracking-samples/ 경로 안에 sample_unity_bodytracking라는 이름의 유니티 예제 폴.. 2022. 2. 22. Unity & C# ~ using 문 * 최초 작성일 : 2022.02.17 * 최종 수정일 : 2022.02.17 using문은 using문을 사용한 메서드의 닫는 중괄호에 도달하면 해당 파일이 삭제(dispose)됨. //예제 using (var file = new System.IO.StreamWriter("WriteLines2.txt")) { int skippedLines = 0; foreach (string line in lines) { if (!line.Contains("Second")) { file.WriteLine(line); } else { skippedLines++; } } return skippedLines; } // file is disposed here (불러온 파일이 삭제) 2022. 2. 17. Unity & C# ~ lock 문 * 최초 작성일 : 2022.02.17 * 최종 수정일 : 2022.02.17 - lock 문은 자신에게 소속된 코드가 실행이 완료되기 전까지 연속적인 호출에도 잠금 상태를 유지함 - 연속적인 호출에도 하위 코드가 완료되지 않으면 하위 코드를 중복 실행하지 않음. lock(x) { //하위 코드 } - 주의사항 * try...finally 예외처리를 사용할 경우 예외가 throw 되더라도 잠금이 해제 * await 연산자 사용 불가 * 교착, 잠금 경합이 발생할 수 있으므로 this, Type인스턴스, 문자열 인스턴스는 최대한 짧은 시간 동안 잠금을 유지. 2022. 2. 17. 이전 1 ··· 17 18 19 20 21 22 23 ··· 41 다음 SMALL