본문 바로가기
링크 정리

유니티 링크

by 피로물든딸기 2023. 7. 29.
반응형

- 환경설정, 배포, 디버깅
- 기본

- 유니티 에디터 스크립팅
- 수학, 물리
- Canvas / UI
- Unity C#
- 오브젝트 조작 및 배치
- 쉐이더, 머티리얼

- 카메라 조작

- 시네머신

- 절차적 메시

- Unity AR

 

Unity Asset Store

 

Unity Plus:

 

Easy 2D, 3D, VR, & AR software for cross-platform development of games and mobile apps. - Unity Store

Have a 2D, 3D, VR, or AR project that needs cross-platform functionality? We can help. Take a look at the easy-to-use Unity Plus real-time dev platform!

store.unity.com

 

Unity Pro:

 

Unity Pro

The complete solutions for professionals to create and operate.

unity.com

 

Unity 프리미엄 학습:

 

Unity Learn

Advance your Unity skills with live sessions and over 750 hours of on-demand learning content designed for creators at every skill level.

unity.com


환경설정, 배포, 디버깅

GitHub Desktop - 유니티 프로젝트 추가하기 (new repository)

gh-pages로 유니티 WebGL 배포하기

유니티 WebGL을 React에 배포하기

유니티 WebGL + React 라우터 적용하기

 

리액트에서 Unity 오브젝트 컨트롤하기 (Communication from React to Unity)

Unity에서 리액트로 이벤트 호출하기 (Communication from Unity to React)

WebGL로 빌드된 유니티 전체 화면으로 변경하기 (Entering Fullscreen Unity WebGL in React)


유니티 에디터 색상 변경하기
유니티 스마트폰 해상도, 화면 비율

안드로이드 OpenGL 설정 (Unity Android OpenGL Settings)

 

스크립트 모양을 톱니 바퀴 아이콘으로 바꾸기 (Replace Script Icon)
씬에서 메시의 와이어 프레임이 보이도록 설정하기 (How to See Mesh Wireframe in Scene)

전처리기 지시문을 사용하여 조건부 컴파일하기 (Scripting Define Symbols)
비주얼 스튜디오에서 Json 파일 열기 (Open Json file in Visual Studio)
Error Pause를 활성화하여 에러 발생 시 게임 멈추기

logMessageReceived로 로그 콜백 추가하기

StreamWriter로 로그를 텍스트 파일로 출력하기 (Output Log with StreamWriter)

OnGUI로 실시간 초당 프레임 수 확인하기 (FPS Status based on OnGUI)

OnGUI, ProfilerRecorder로 런타임 드로우 콜 확인하기 (How to Get Draw Call Count at Runtime)

 

스톱워치로 실행시간 확인하기 (Unity Stopwatch Timer)

 

다양한 캐스트 사용하기 (RayCast, BoxCast, SphereCast, CapsuleCast)

Missing Component 찾기

Additive Scene으로 여러 개의 씬 편집하기

 

Editor.log에서 빌드에 포함된 리소스 확인하기

윈도우 빌드 해상도, 창모드 설정하기

유니티 컴파일 옵션 변경하기 (Recompile After Finished Playing)


기본

 

유니티 vs 언리얼 용어 비교 (Quick Glossary Unreal vs Unity)


유니티 게임 씬 화면 조작 및 단축키
화면 클릭 시, RayCast 그리기
버텍스 스내핑 (Vertex Snapping)
클릭 후 화면 영역 구분하기
유니티 Plane, 평면의 길이
간단한 투명 Material 만들기
콜라이더의 중심과 경계 (center, extents)
스프라이트 자르기 (Slice Sprite)
유니티 GL로 화면에 그림 그리기

인보크로 일정 시간 이후 함수 실행하기, 반복하기 (Invoke)

자식 오브젝트 접근, 순회하기 (Iterating Child GameObjects)

OverlapSphere로 주변 콜라이더 탐색하기 (Check Collisions using OverlapSphere)

yield return null vs WaitForEndOfFrame 비교하기

CreatePrimitive로 기본 오브젝트 만들기 (Create PrimitiveType Object)

위도, 경도, 고도 찾기 (Get GPS Information about latitude, longitude, altitude)

 

OpenGL로 화면에 선 그리기 (Draw a Line using Unity GL)

OpenGL로 화면 터치 이펙트 만들기 (Simple Screen Touch Effect with Unity GL)

OpenGL로 멀티 터치 이펙트 만들기 (Simple Screen Multi Touch Effect with Unity GL)


롱 클릭 구현하기
더블 클릭 구현하기
스크립트로 레이어(Layer) 관리하기
런타임 시 프리팹에 스크립트 추가하기 (Attach Script when Instantiate a Prefab)
스카이박스(Skybox) 변경하기
스크립트로 게임 일시정지하기 (Unity Pause by Scirpt)

스크립터블 오브젝트로 스크립트와 데이터 분리하기

스포트 라이트가 오브젝트를 관통하는 문제 해결하기 (How to Fix the Spot Light Through the GameObject)

라인 렌더러로 그리드 만들기 (Make Grid with LineRenderer)

라인 렌더러로 간단한 화살표 만들기 (Make Simple Arrow with LineRenderer)


JsonUtility로 Json 파싱하기 : (1) 기본
JsonUtility로 Json 파싱하기 : (2) 배열 파싱
JsonUtility로 Json 파싱하기 : (3) 오브젝트 배열 파싱
JsonUtility로 Json 내보내기 : (4) Export

 

네비메쉬 에이전트로 장애물 피하면서 이동하기

네비메쉬 에이전트의 경로를 라인 렌더러로 표시하기 (Draw the Path of NavMeshAgent with LineRenderer)

 

드로우 콜 횟수 최적화하기 (Optimizing Draw Calls, Batches)


유니티 에디터 스크립팅

 

속성으로 인스펙터 정리하기 (Customizing the Inspector with Attributes)

[SerializeField] / [Serializable] 직렬화로 Inspector에 보여주기

[ExecuteInEditMode]로 편집 모드에서 스크립트 실행하기

[InitializeOnLoad] 에디터 플레이 후 씬 자동 저장 (Unity Auto Saving In Editor)

[RequireComponent]로 Component 강제 설정하기

[DisallowMultipleComponent]로 스크립트 중복 금지하기

[MenuItem] / [ContextMenu] / [ContextMenuItem] 속성으로 원하는 함수 실행하는 메뉴 만들기

[AddComponentMenu]로 Script 메뉴 관리하기

 

OnDrawGizmos로 Scene에 선 그리기

OnValidate와 Reset으로 디버깅하기

퍼블릭 변수 변경시 이벤트 발생 (Public Value Event Handler)

 

2차원 배열 인스펙터에 보여주기 (2D Array in the Inspector)
커스텀 에디터로 인스펙터 수정하기 (Inspector with Custom Editors)
에디터 윈도우에서 실시간으로 2차원 배열 디버깅하기 (EditorWindow)
에디터 윈도우에서 블럭의 위치 Mapping 하기 (EditorWindow)


수학, 물리

평면과 점 사이의 최단거리 구하기 (How to Get Shortest Distance between the Plane and the Point)

평면과 점 사이의 최단거리를 만드는 평면 위의 점 구하기

평면과 직선의 접점 좌표 구하기 (Intersection of a Line and a Plane)

2차원 평면에서 유한한 선의 교점 구하기 (Intersection of Two Finite Lines in 2-Dimension)

Vector3.Cross로 평면 위에서 시계 방향 판단하기 (Determine Clockwise on the Plane with Vector3.Cross)

다각형 좌표의 시계 방향 판단하기 (How to Determine If a Polygon is Clocwise)

직선을 N등분 하기 (Dividing a Line)

 

3차원에서 두 직선 사이의 최단 거리를 만드는 직선 (How to Find the Points of Intersection Two Lines in 3D)

3차원에서 점과 직선의 거리 (Find Distance between a Point and a Line)

3차원에서 점과 직선 사이의 수선의 발 구하기 (Find a Point Perpendicular to a Line)

임의의 다각형을 포함하는 사각형 구하기 (Polygon in a Rectangle)

컨벡스 헐로 볼록 다각형을 만드는 점의 좌표 구하기 (Find Points that Make the Polygon with Convex Hull)

컨벡스 헐로 임의의 점을 모두 포함하는 사각형 구하기 (Points in a Rectangle with Convex Hull)

 

세 점을 지나는 평면 구하기 (Creating a Plane from 3 Dots)

3차원 세 점의 좌표로 삼각형의 넓이 구하기
삼각형 안에 있는 점 판단하기 (How to Check If a Point Is Inside a Triangle)

사각형 안에 있는 점 판단하기 (How to Check If a Point Is Inside a Rectangle)

다각형 안에 있는 점 판단하기 (How to Check If a Point Is Inside a Polygon)

오목 다각형의 삼각분할 (Polygon Triangulation)

구멍이 있는 다각형의 삼각분할 (Polygon Triangulation with One Hole)

여러 구멍들이 있는 다각형의 삼각분할 (Polygon Triangulation with Holes)

 

벡터의 내적 / 외적 / 아다마르 곱 (Dot, Cross, Scale)
쿼터니언과 회전의 덧셈 (How to Add Two Quaternions)

 

스트로보 효과 (Stroboscopic Effect with Unity)

 

쿼터니언으로 구현한 단진자의 운동 (Simple Pendulum with Unity Quaternion)
쿼터니언으로 구현한 단진자의 운동 확장 (Expanded Simple Pendulum with Unity Quaternion)
독립된 단진자의 운동 (Independent Simple Pendulum with Unity LerpAngle)
런타임에 단진자 운동 설정하기 (Runtime Independent Simple Pendulum)

라인 렌더러를 이용한 단진자 속도의 시각화

운동하는 단진자의 로프를 끊기 (Cut the Rope)


Canvas / UI

간단한 토스트 메시지 만들기 (Toast Message)

코루틴 메시지 큐로 순서대로 함수 실행하기 (Execute Coroutines Run in Order using Message Queue)

슬라이더로 안개 조절하기 (Unity Fog Slider)
타임 슬라이더 만들기 (Time Slider)
Light Rotate로 간단히 낮과 밤 구현하기
색상 변경 에디터 만들기 (Circle Color Picker)
Color Picker로 오브젝트 색깔 변경하기
롱 클릭 progress bar 처리하기
파이 메뉴(Pie / Radial Menu) 만들기
Text Mesh Pro 텍스트에 그림자 효과 넣기 (Drop Shadow)

유니티 UI - Text Mesh Pro 한글 깨짐 현상 해결하기

Scale With Screen Size로 캔버스 UI 크기 자동 변환하기

PlayerPrefs로 드롭다운 목록 관리하기 (Control TextMeshPro Dropdown with PlayerPrefs)

UI가 있는 경우 Raycast 제한하기 (Detecting when a touch is over UI element)


에셋 - 런타임 파일 브라우저로 파일 업로드하기 (Upload Files using Runtime File Browser)
에셋 - 런타임 파일 브라우저로 파일 저장하기 (Save Files using Runtime File Browser)

에셋 - Lean Touch로 마우스 클릭 이펙트 보여주기 (Click Effect / Input Management)


Unity C#

추상 클래스와 상속
프로퍼티로 readonly 변수 만들기

C# Dictionary와 delegate를 이용한 함수 포인터

확장 메서드 (Extension Method) / static method의 this paramter

Switch Expression (스위치 표현식)

문자열 합치기

튜플로 여러 값 반환하기 (Returning Multiple Values Using Tuple)

비교 함수를 이용하여 리스트 정렬하기 (List Sorting with Compare)

 

변수 변경시 이벤트 발생 (Simple Event Handler)

Action으로 이벤트 등록하기 (Register Method with Action)

 

하위 폴더의 모든 파일 통합하기 (Recursive Folder Merger)


오브젝트 조작 및 배치

선택한 블럭 이동하기
블럭 한 칸 이동하기 (그리드 기반 이동, 코루틴)
스크립트로 오브젝트 이동하기, RayCast로 멈추기 (1)

스크립트로 오브젝트 이동하기, RayCast로 멈추기 (2)

드래그로 오브젝트 Y축 회전하기 (Drag to Rotate Object in Y-axis)
드래그로 오브젝트 위, 아래로 움직이기 (Drag Object in Y-Axis)

드래그로 오브젝트 움직이기 (Move GameObject with Drag)
드래그로 땅 위의 오브젝트 움직이기 (Drag and Move on the Ground)
드래그로 평면 위의 오브젝트 움직이기 (Drag and Move on the Plane)

드래그로 블럭 옆으로 한 칸 움직이기 (Drag GameObject Snapped to a Grid)

멀티 터치 드래그로 오브젝트 크기 변경하기 (Change Object Scale with Multi Touch Drag)

 

BoundBox로 블럭이 움직일 위치 미리 예상하기 (Runtime Collider, 런타임 콜라이더)
오브젝트 생성 효과 - SmoothDamp를 코루틴에서 사용하기 (SmoothDamp with Coroutine)

코루틴으로 오브젝트 90도 회전하기 (Rotate GameObject using Coroutine)

쿼터니언 AngleAxis로 벡터 회전하기 (Rotate Vector with Quaternion AngleAxis)

 

오브젝트를 선택된 상태로 만들기 : (1) bool
오브젝트를 선택된 상태로 만들기 : (2) 이미지로 만들기
오브젝트를 선택된 상태로 만들기 : (3) Shader Outline
오브젝트를 선택된 상태로 만들기 : (4) 오브젝트를 하나만 선택하기

자식 오브젝트를 원형으로 배치하기 (Circular Arrangement)
Line Renderer로 게임 오브젝트끼리 연결하기 (연결 선 그리기)
오브젝트를 움직일 때 좌표축 만들기 (Line Renderer)

 

BFS를 이용하여 평면을 그리드로 나누기 (Converting a Plane to a Grid with BFS)

다익스트라를 이용하여 최단 경로 이동하기 (Move the Shortest Path using Dijkstra)


쉐이더, 머티리얼

평면의 양면 렌더링
속성 타입과 인터페이스 옵션 (Properties Type and Interface Attributes)
카메라 흑백 효과로 게임 오버 이펙트 만들기 (Camera Game Over Effect)
카메라가 바라보는 방향으로 밝아지는 큐브

머티리얼 로드하고 바꾸기 (Load and Change Materials)


카메라 조작

마우스로 카메라 회전하기 (오일러 각)
1인칭 시점 조작 first person view controller

마우스 스크롤로 카메라 줌 인 / 아웃 (Camera Zoom in / out with a Mouse Scroll)

멀티 터치 드래그를 이용하여 카메라 줌 인 / 아웃 (Camera Zoom in / out with Multi Touch Drag)
게임 오브젝트 기준으로 카메라 움직이기
카메라와 오브젝트의 각도 구하기
드래그로 카메라 회전 및 이동하기 (Camera Rotate and Move with Drag)

드래그로 카메라 이동 (Drag and Move Camera)

 

 

Camera.main이 널 참조 익셉션을 내는 경우 해결 방법 (How to Fix NullReferenceException on Camera.main)


시네머신

 

Cinemachine Tutorial

 

(1) Project Setting
(2) 마우스 버튼 클릭으로 FreeLook Camera 컨트롤하기
(3) 마우스 스크롤로 FreeLook Camera Zoom in / out
(4) 스크립트로 FreeLook Camera 제어하기
(5) Blend List Camera로 카메라 전환하기
(6) Blend List Camera로 자연스럽게 시야 변경하기
(7) 스크립트로 Blend List Camera 제어하기
(8) 우선순위를 설정해서 카메라 전환하기
(9) State Driven Camera로 애니메이션의 상태에 따라 화면 전환하기
(10) 스크립트로 State Driven Camera 제어하기

(11) ClearShot Camera로 충돌을 감지하여 카메라 전환하기

(12) ClearShot이 불가능한 경우 FreeLook으로 전환하기

(13) Dolly Track으로 카메라 촬영 경로 조절하기

(14) Dolly Cart로 Track을 따라 촬영하기

(15) Target Group으로 지정한 타겟을 모두 촬영하기

(16) Mixing Camera로 화면 혼합하기

 

두 대 이상의 카메라로 화면 비교하기 (How To Compare Scene using Two Camera with Cinemachine Brain)

가상 카메라 전환 설정 비교하기 (Compare Virtual Camera Settings about Blend Hint of Transitions)

카메라 전환 블렌딩 모드를 원하는 대로 변경하기 (How to Make Custom Blend Mode)

현재 활성화된 가상 카메라 가져오기 (How to Get Active Virtual Camera)

FreeLook + TargetGroup으로 전체 지도 촬영하기


Procedural Mesh

 

삼각형 그리기 (Make Triangle with Procedural Mesh)

메시 기준점 설정하기 (Setting Offset with Procedural Mesh)

절차적 메시의 양면 렌더링 (Double Sided Rendering with Procedural Mesh)

삼각형 두 개와 쿼드 비교하기 (Compare Two Triangles and Quad)

정다각형, 원 만들기 (Make Regular Polygon, Circle with Procedural Mesh)

 

N x M 평면 만들기 (Make N x M Plane with Procedural Mesh)

간단한 지형 만들기 (Make Simple Terrain with Procedural Mesh)

 

정사면체 그리기 (Make Tetrahedron with Procedural Mesh)

정다각뿔, 원뿔 그리기 (Make Regular Pyramids, Cone with Procedural Mesh)

정다각뿔, 원뿔 그리기 개선 (Make Regular Pyramids, Cone with Procedural Mesh 2)

정다각기둥, 원기둥 그리기 (Make Regular Prism, Cylinder with Procedural Mesh)

정다각기둥, 원기둥 그리기 개선 (Make Regular Prism, Cylinder with Procedural Mesh 2)

 

정점이 8개인 큐브 만들기 (Make 8 Vertices Cube with Procedural Mesh)

정점이 24개인 큐브 만들기 (Make 24 Vertices Cube with Procedural Mesh)

2D 복셀 만들기 (Make 2D Voxels with Procedural Mesh)

3D 복셀 만들기 (Make 3D Voxels with Procedural Mesh)

 

절차적 메시와 삼각분할로 다각형 만들기 (Polygon Triangulation with Procedural Mesh)

절차적 메시로 만든 정다각형의 삼각분할 (Regular Polygon Triangulation)

절차적 메시와 삼각분할로 여러 구멍들이 있는 다각형 만들기 (Polygon Triangulation with Holes)

 

메시의 정점 개수 구하기 (The Number of Vertices in the Mesh)

절차적 메시로 만든 메시 저장하기 (Save Procedural Mesh)

메시의 로컬 좌표를 월드 좌표로 변환하기 (How to Transform Local or World Position of Mesh Vertices)

CombineInstance로 메시 합치기 (Combine Meshes with CombineInstance)

triangles로 다각형의 원래 좌표 복구하기 (Recover the Original Coordinates of a Polygon with Triangles)


Unity AR

 

유니티 프로젝트에 뷰포리아 라이센스 키 적용하기 (Applied License Key for Unity Vuforia)

 

이미지 타겟팅으로 오브젝트 띄우기 From Image (Vuforia Image Targeting From Image)

이미지 타겟팅으로 오브젝트 띄우기 From DataBase (Vuforia Image Targeting From DataBase)

이미지 타겟에 버추얼 버튼 추가하기 (Add Virtual Button to Image Target in Vuforia)

이미지 타겟 인식 아웃라인 만들기 (Make Outline for Image Target in Vuforia)

책을 누르면 구매 URL로 이동하기 (Touch a Book to Move to URL with Image Targeting in Vuforia)

원소를 합쳐서 물 만들기 (AR Chemical Formula For Water in Vuforia)

사진을 누르면 비디오 실행하기 (Video PlayBack in Vuforia)

 

멀티 타겟팅으로 오브젝트 띄우기 (Vuforia Multi Targeting)

멀티 타겟팅 : 파이어볼 발사하기 (Shoot Fireball in Vuforia)

 

실린더 타겟팅으로 오브젝트 띄우기 (Vuforia Cylinder Targeting)

클라우드에 데이터 베이스 만들기 (Vuforia Cloud Recognition)

모델 타겟팅으로 오브젝트 띄우기 (Vuforia Model Targeting)

QR 코드, 바코드 인식하기 (Vuforia QR Code, Barcode Scanner)

그라운드 플레인으로 평면 인식하기 (Vuforia Ground Plane)

미드 에어 앵커로 오브젝트 생성하기 (Vuforia Mid Air Anchors)

 

OnTargetStatusChanged로 타겟 상태 관리하기 (Control Target Status with OnTargetStatusChanged)

OnTargetFound, Lost로 AR 오브젝트 추적하기 (Track AR Object)

 

 

 

 

 

 

반응형

'링크 정리' 카테고리의 다른 글

알고리즘 문제 링크  (1) 2024.01.04
Electron 링크  (0) 2024.01.04
언리얼 링크  (0) 2023.07.29
깃 / 깃허브 링크  (0) 2023.07.29
JavaScript, React 링크  (0) 2023.07.29

댓글