본문 바로가기

Unity/01.General13

C# Error CS0103 에러 Unity의 업데이트 창이 떠서, Unity 2019.4.18f1 (LTS) 버전을 설치한 후, 2019.4.17f (LTS) 버전 프로젝트를 열고 C# 스크립트를 실행하려고 하니, CS0103 에러가 계속해서 나타난다. C# Error CS0103으로 구글해서 아래의 포스팅에서 아주 간단한 해결책을 찾음. forum.unity.com/threads/error-cs0103.459748/#post-2984884 Error CS0103 Hello. I am completely new to this and I am going thru some tutorials. Now I have encountered an error. Whever I try to make a C# script it says on... for.. 2021. 1. 14.
OmniSharp, .NETFramework(?) 에러 새 프로젝트를 만든 후, C# 스크립트를 생성시키면 계속해서 에러 워닝이 뜨고, Play가 안된다. 사용 버전은 Unity: 2019.4.17f(LTS), VS Code: 1.52.1 검색해보니 두 가지의 가능성이 검색되었다. 1. .NETFramework에러 인듯해서 아래 링크에서 최신 5버젼을 깔았음 dotnet.microsoft.com/download Download .NET (Linux, macOS, and Windows) Free downloads for building and running .NET apps on Linux, macOS, and Windows. Runtimes, SDKs, and developer packs for .NET Framework, .NET Core, and ASP... 2021. 1. 13.
Linux에 Unity3D 설치하기 Linux Mint 20 Ulyana (Cinnamon) 기준 1. Linux를 최신상태로 업데이트 한다. sudo apt update && sudo apt upgrade -y 2. Depencencies와 Mono를 설치한다. sudo apt install libgtk2.0-0 libsoup2.4-1 libarchive13 libpng16-16 libgconf-2-4 lib32stdc++6 libcanberra-gtk-module sudo apt-get install mono-devel 3. 링크에서 Linux용 Unity Hub를 다운로드 한 후, 다운 받은 AppImage에 실행 권한을 부여한다. cd ~/Downloads chmod +x UnityHub.AppImage 4. Unity Hub를 실.. 2020. 9. 9.
추천 Project 폴더 구조 Unity 프로젝트 제작시 아래와 같은 폴더 구조를 추천 01.Scenes: 생성된 Scenes 02.Scripts: 각종 Scripts 03.Prefabs: Hiearchy의 Model을 이 폴더로 Dragging시 Prefabs으로 자동 변환 04.Images: 각종 이미지 모음 (Materials라는 하위 폴더를 만들어서 Scene에 사용된 재질을 모아두는 폴더) 05.Models: Import한 3d모델 06.Sounds: 소리 07.Animations: 움직임 데이터 08.Effects: 각종 특수효과 Resources(대소문자, 복수형 필수): Unity에서 지정한 특수 폴더로서 Resources에 있는 데이터는 빌드 시 무조건 포함됨. 하지만 일반적인 Data와는 다르게 메모리를 점유하지 않.. 2020. 8. 6.
Order of Execution for Event Functions docs.unity3d.com/Manual/ExecutionOrder.html Unity - Manual: Order of Execution for Event Functions Understanding Automatic Memory Management Order of Execution for Event Functions Running a Unity script executes a number of event functions in a predetermined order. This page describes those event functions and explains how they fit into the execution se docs.unity3d.com docs.unity3d.com/Manual/E.. 2020. 8. 4.
Collider 충돌을 감지하기 위한 Component (Unity 2019.4.5f1 기준) Collider는 GameObject 별로 부여해야 GameObject 사이에 물리 계산이 됨. 게임 중 이동해야 하는 객체에는 Rigidbody component가 있어야함. Rigidbody component가 추가되어 있다면 Collider의 타입에 따라 물리적 반응을 함. (예: Box mesh+Rigitbody+Sphere collider: Box가 구처럼 굴러감) Sphere(반지름) > Capsule(반지름+높이) > Box(가로*세로*높이) 순으로 감지속도가 빠름 Component - Physics - Rigidody/Box/Sphere/Capsule/Mesh/Wheel/Terrain Collider 선택 (On.. 2020. 8. 4.
Unity가 미리 정의하고 있는 폴더 생성이 될 경우, 임의 삭제 금지 Editor: Editor 폴더 내에 C# 스크립트가 있을 경우, editor mode에서도 컴파일 된다. Editor의 임의의 메뉴를 만들어서 작업에 활용할 수 있다. Gizmos: Unity내에서의 User-defined 아이콘 리소스가 포함되는 폴더 Plugins: Unity 외부에서 주변기기와 소켓통신으로 통신하기 위한 dll 파일이 저장되는 폴더 Resources: 메모리에 상주하지 않고, 필요시에만 불러오는 데이터가 저장되는 폴더. Build시 무조건 포함된다. Standard Assets: Asset store에서 패키지를 설치하면 기본적으로 설치되는 폴더 Streamming Assets: 씨네마틱 영상과 같은 asset을 저장 해놓는 폴더 2020. 8. 4.
Tag 부여 방법 gameObject에 tag를 부여하여 충돌이 발생했을 때, gameObject를 판별한 후 gameObject별로 다른 action을 트리거 할 수 있다. gameObject를 선택한 후, Inpector 뷰에서 Tag 부분에 Add Tag를 클릭하여 Tag를 추가할 수 있다. Tag는 대문자로만 구성하는걸 추천 2020. 8. 4.
Prefab의 Child 속성 변경 시 Original에 변경된 속정 적용하기 Prefab의 child 다른 작업을 할 경우, 왼쪽에 바란 바가 생기고, Prefab에 적용하기 위해서는 Overrides를 선택해서 Apply All을 클릭한다. 2020. 8. 4.
Auto Generate Lighting Map Unity는 Lighting map 빌딩 작업이 백그라운드에서 자동으로 진행되도록 설정할 수 있다. 화면 우측 최하단에 Auto Generate Lighting Off에서 오른쪽 마우스를 클릭하면 Lighting View가 열리며 'Auto Generate' 체크박스를 체크 하면 된다. 2020. 8. 3.
Unity Basic - Interface02 Transform Tools Hand Tool (Q): Scene 카메라를 평행 이동한다. Mouse Wheel Click/Dragging으로 화면을 이동시킬 수 있다. 오른쪽 마우스 클릭한 상태로 WASDQR 키로 FPS게임처럼 화면 이동(Fly through 모드)이 가능하다. Option/Alt를 누르고 마우스 왼쪽 버튼을 Click/Dragging으로 Scene 중심을 기준으로 화면을 회전시킬 수 있다. Move Tool (W): GameObject를 선택하여 GIZMO로 이동을 시킬 수 있다. Move Tool이 선택된 상태에서, Command+Alt(Option)로 Hand Tool을 일시적으로 활성화 시킬 수 있다. Rotate Tool (E): GameObject를 선택하여 GIZMO로 회.. 2020. 8. 2.