목록개발/Unity (23)
소소한 개발 공부

Unity ML-agent는 Unity에서 제공해주는 강화학습 툴입니다. https://unity.com/kr/products/machine-learning-agents 머신러닝 에이전트 심층 학습 기술을 활용하는 툴킷으로 지능적인 반응형 에이전트를 만들어 보세요. unity.com 22.11.22 기준 2.3.0 버전까지 릴리즈되어 있으며, 이 게시글에서는 2.2.1 버전을 다룰 예정입니다. 참고 및 출처 유니티 머신러닝 ML-Agents 퀵스타트 - 레트로 [유니티 TUTORIAL] ML-Agents 설치 & 예제 환경 정복하기 발표 자료 (+ 안에 원래 예제 실행 영상도 있었는데, 용량 제한으로 인해 pdf로 업로드 합니다. 1) ML-Agent 란 ML-Agent란 Machine Learning ..

https://answers.unity.com/questions/1676414/how-to-edit-text-mesh-pro-face-dilate-through-scri.html How to edit Text Mesh Pro face dilate through script - Unity Answers answers.unity.com using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class testdilate : MonoBehaviour { public TextMeshProUGUI bi; public void OnClick() { StartCoroutine(StartSFX())..
빌드한 파일 안에 있는 파일을 읽으려고 하는데 모바일과 윈도우 에디터 환경이 달라 빌드 환경에서 파일을 찾지 못하는 일이 있었다. 아래의 사이트에서 해결 방안을 얻어서 기록을 남긴다. https://answers.unity.com/questions/974942/accessing-binary-file-on-android-via-www.html Accessing binary file on Android via WWW - Unity Answers answers.unity.com public void Process() { StartCoroutine(LoadFileOnAndroid(fileName)); } IEnumerator LoadFileOnAndroid(string fileName) { string path..

1. static 클래스를 붙여 사용하기 public static class TimeStringFormatter { public static string Sec2Time(int secValue) { string time = string.Empty; if (secValue / 3600 > 0) { time = string.Concat(time, (secValue/3600).ToString(), " 시간 "); secValue = secValue % 3600; } if (secValue / 60 > 0) { time = string.Concat(time, (secValue/60).ToString(), " 분 "); secValue = secValue % 60; } if (secValue % 60 >= 0) ..

아래 영상을 참고해 작성했습니다. https://www.youtube.com/watch?v=_QajrabyTJc CharacterController를 이용해 FPS 시점의 캐릭터의 이동을 구현해본다. (unity 버전 2020.3.25f1 버전 사용) 1. 캐릭터 생성 먼저 캐릭터로 쓸 Capsule 오브젝트와 땅 Plane 오브젝트를 생성한다. 현재 플레이어에는 Capsule collider가 있는 상태인데, 여기에 AddComponent로 Character Controller를 추가하고 Capsule collider는 제거한다. (오른쪽 이미지처럼..) CharacterController는 기본적으로 Capsule collider를 가지고 있고 또한, rigidbody가 없이 충돌에 의한 움직임을 다..
배열을 리스트에 넣으려면 아래와 같이 리스트의 생성자를 이용하면 된다. int[] some = {1, 2, 3}; List something = new List(some); 비슷한 응용으로 자식 오브젝트에서 컴포넌트 인스턴스들을 찾아 List에 넣고자 할 때는 아래와 같이 작성하면 리스트에 한번에 넣을 수 있다. List something = new List(GetComponentsInChildren()); +) 리스트 원소들 한번에 제거는 RemoveAll을 사용하면 된다. something.RemoveAll(something.Contains);