Unity 숙련 주차 - Start! 😚
☘️ 목차
1️⃣ 학습 주제
1️⃣ 1-1
2️⃣ 1-2
2️⃣ Newly learned info
3️⃣ Live Session
⚙️ 1-1 3D Build Settings in a 3D Unity Project
💥 빌드하자마자
error CS0006: Metadata file 'Library/PackageCache/com.unity.collab-proxy@2.8.2/Lib/Editor/PlasticSCM/log4netPlastic.dll' could not be found 로 협박을 당하게 되는데..
김빠지지만 바로 지교수님께 직행 🤔
🔽 해결 방법은 이러이러하다.
✅ 해결 방법 1: Unity 재시작 + 재임포트 → 1번 방법으로 바로 해결 !
- Unity 종료
- 프로젝트 폴더 열기
- Library 폴더 삭제 (무거운 작업일 수 있으니 기다려야 함)
- Unity 다시 열기 (자동으로 Library 및 PackageCache 재생성됨)
✅ 해결 방법 2: 패키지 다시 설치
- Unity에서 Window > Package Manager 열기
- Collaborate 또는 Version Control (Plastic SCM) 찾기
- 제거(Uninstall)한 후 다시 설치하거나, 최신 버전으로 업데이트
✅ 해결 방법 3: manifest.json 수정
- 프로젝트 폴더 > Packages/manifest.json 열기
- "com.unity.collab-proxy": "2.8.2" 부분을 찾아서 지우거나 "2.8.2" → "2.0.3" 등 다른 버전으로 변경
- 저장 후 Unity 다시 실행
✅ 해결 방법 4: Collaborate 안 쓸 거면 아예 삭제
Collaborate 기능 안 쓴다면, 아예 manifest.json에서 "com.unity.collab-proxy" 항목 삭제
다시 유니티로 복귀 후,
The Progressive CPU lightmapper is not supported on Apple silicon, switching to the Progressive GPU lightmapper.
경고가 떠서 보니
- Apple Silicon에서는 Progressive CPU 라이트매퍼가 아예 지원되지 않음.
- 따라서, 유니티에서 자동으로 GPU Lightmapper로 바꿔줬기 때문에 렌더링/베이크에는 영향 없음. 이라고 한다!
⚙️ 1-2 Understanding How to Create a Player in Unity
Rigidbody - ForceMode
1️⃣ 힘 (Force) Rigidbody.AddForce(Vector3 force, ForceMode.Force);
2️⃣ 가속도 (Acceleration) Rigidbody.AddForce(Vector3 force, ForceMode.Accleration);
3️⃣ 충격량 (Impulse) Rigidbody.AddForce(Vector3 force, ForceMode,Impulse);
4️⃣ 속도 변화량 (VelocityChange) Rigidbody.AddForce(Vector3 force, ForceMode.VelocityChange);
Raycast : 물체 판단 함수
➡️ 맞으면 true
1️⃣ 오브젝트 Ray ray = new Ray(transform.position, transform.forward);
2️⃣ 가속도 Ray ray = Camera.main.ViewportToRay
3️⃣ 충격량
4️⃣ 속도 변화량
ੈ Ray Distance : 물체와의 거리
ੈ Ray ray = new Ray : 시작점과 방향
ੈ ViewportPointToRay : 카메라를 중심으로 뽑아내는
ੈ newVector3 : 기준
ੈ ScreenPointToRay : screen 터치 구간에서
ੈ LayerMask : filtering
✅ 10f에서 f는 float 타입 이다.
- C#에서는 10만 쓰면 int로 인식되기 때문에, 실수(float) 값으로 쓰고 싶으면 f를 붙여주기
Raycast
1️⃣
2️⃣
3️⃣
4️⃣
2️⃣ Newly learned info
✅ 10f에서 f는 float 타입 이다.
- C#에서는 10만 쓰면 int로 인식되기 때문에, 실수(float) 값으로 쓰고 싶으면 f를 붙여주기
✅ 영어와 코드 구조 비교 (기본 문장 구조)
| I eat apples. | 나는 사과를 먹는다. | player.Eat(apple); |
| She hits the ball. | 그녀가 공을 친다 | she.Hit(ball); |
| We move forward. | 우리는 앞으로 간다 | we.Move(forward); |
- 주어(subject) → player, she, we
- 동사(verb) → Eat(), Hit(), Move()
- 목적어(object) → apple, ball, forward
→ 즉, 코드도 "주어 + 동사(함수) + 목적어(인자)" 구조가 기본이야.
3️⃣ Third Live Session
한글 변환키 잘 안먹혀서 영어로 씀..
2D(Core) : Unity 기본 Renderer
-> 추가 패키지 다운 시 전환 가능!
-> 설정 변경하면 2D에서 3D 전환 가능
Universal : Advanced Renderer
FPS Microgame / 2D Platform Microgame : 학습용, 해보쟈
Orthographic :
Camera - far : 1(최적화)
Main Scene 에서 URP -> post processing is essential !
Priority 레이어 우선순위\
UI Camera doesn't need to Render Shadows.
Background - UnInitialized's essential
Occlusion Culling needs to be checked! : Optimization Rendering
Canvas Settings is essential.
change to screen camera and drag UI Camera
Plane Distance : 1
UI Scale Mode : Scale with Screen Size 1920 : 1080
❗️ 여기서부터 다시 : Method for applying 9-slice
Disable Raycast Target
Graphic Raycaster: If the Block Mask is set to 'Everything', it may not work as expected.
Canvas Renderer!!
Panel - Image ✅
How to create a gauge UI in Unity and
How to set the gaze size
Canvas Scaler has to be set to scale with screen height.
✅ What is a Gizmo in Unity?
Gizmo는 Unity 에디터에서 **장면(Scene) 뷰에만 보이는 시각적 도구(아이콘, 선, 영역 등)**입니다.
→ 게임 실행 중에는 보이지 않고, 개발자에게 오브젝트의 위치, 방향, 범위 등을 시각적으로 표시해줍니다.
| 🎯 Transform 기즈모 | 위치 이동, 회전, 스케일 조절할 때 생기는 XYZ 화살표 |
| 🔵 Gizmo.DrawWireSphere() | 충돌 범위나 탐지 범위 등 개발자가 커스텀으로 그리는 원/선 |
| 🟦 Box Collider 기즈모 | 박스 형태의 충돌 범위 표시 |
| 💡 Light 아이콘 | Scene 뷰에서 Light 컴포넌트가 어디 있는지 보여줌 |