Engine

    Built-in Render Pipeline => URP (Universal Render Pipeline) 세가지 방법

    Built-in Render Pipeline => URP (Universal Render Pipeline) 세가지 방법

    기존 프로젝트가 Built-in Render Pipeline 인데 이것을 URP로 변경하는 방법은 아래와 같이 세 가지 있습니다. 첫째, URP 프로젝트로 template을 시작하는 것이 가장 좋다. 둘째, 기존의 Built-in Render Pipeline 프로젝트에서 직접 설정을 하고, shader나 post processing effect를 다시 생성해야 합니다. 셋째, Window => Rendering => Render Pipeline Convert 메뉴를 통해 Built-in에서 URP로 convert 가능합니다. 출처 : Getting started | Universal RP | 12.1.12 (unity3d.com) Getting started | Universal RP | 12.1.12 ..

    유니티 프로젝트 폴더들의 이름 정하기

    유니티 프로젝트 폴더들의 이름 정하기

    출처 : Best practices for organizing your Unity project | Unity Best practices for organizing your Unity project | Unity Get tips and best practices on how to set up your Unity project for team-based game development and version control, from folder structure to naming and coding standards, and so much more. unity.com

    Unity 2022.3.4f1 LTS 설치 완료

    Unity 2022.3.4f1 LTS 설치 완료

    2023년 7월 3일을 기준으로 recommended 된 유니티 엔진 버전은 Unity 2022.3.4f1 LTS 이다. 보다 상세한 릴리즈 노트는 아래 링크와 같다. 릴리즈 노트에 명시된 것들 중 대부분은 버그 수정이다. Unity 2022.3.4 2022.3.4f1 unity.com

    플러그인 에셋 소개 : Hierarchy Pro 2021

    플러그인 에셋 소개 : Hierarchy Pro 2021

    Hierarchy Pro 2021은 복잡한 hierarchy 트리를 보다 보기 좋게 보이도록 하는 플러그인이다. 가격도 그리 비싸지 않고 좋다. 회사에선 사용하지 않고 개인 프로젝트할 때 주로 쓰는 플러그인이다. 에셋스토어 링크 https://assetstore.unity.com/packages/tools/utilities/hierarchy-pro-2021-89542 Hierarchy Pro 2021 | 유틸리티 도구 | Unity Asset Store Use the Hierarchy Pro 2021 from EM on your next project. Find this utility tool & more on the Unity Asset Store. assetstore.unity.com

    유니티 에셋 스토어 장바구니에 하나 담다 : Hierarchy Folders

    언리얼은 폴더라는 개념이 있는데 유니티는 Hierarchy 상에서는 게임 오브젝트만 가능하고 폴더라는 개념이 없다. 아래 링크의 플러그인은 폴더 생성 뿐만 아니라 다양한 유용한 기능을 제공해 가성비가 좋겠다라고 할 수 있겠다. https://assetstore.unity.com/packages/tools/utilities/hierarchy-folders-157716 Hierarchy Folders | 유틸리티 도구 | Unity Asset Store Use the Hierarchy Folders from Sisus on your next project. Find this utility tool & more on the Unity Asset Store. assetstore.unity.com

    유니티 인스펙터 상에 보이지 않도록 [HideInInspector]

    멤버 변수를 public으로 해두고 유니티 인스펙터 상에 보이지 않게 하려면 아래 코드와 같이 [HideInInspector]를 추가해 주면 된다. public class Player : MonoBehaviour { public static Player instance { get; private set; } [HideInInspector] public PlayerAnimation m_Animation; [HideInInspector] public PlayerStats m_Stats; [HideInInspector] public PlayerHealth m_Health; [HideInInspector] public PlayerInput m_UserInput; [HideInInspector] public Pl..

    유니티 플레이어 게임오브젝트에 컴포넌트 붙이기

    유니티 플레이어 게임오브젝트에 컴포넌트 붙이기

    게임 플레이어를 프리팹으로 만들고, 게임 플레이어는 여러가지 컴포넌트들이 아래와 같이 붙어있다. 이렇게 기능 별로 만들어 두어야 컴포넌트 조립이 수월해진다. 예를 들자면, 적 캐릭터에 붙일 수 있는 컴포넌트들이 있겠다. Character Controller : 유니티에서 기본적으로 제공하는 캐릭터 컨트롤러 Player : 최상위 클래스에 아래의 컴포넌트들을 가지고 있을 수 있다. Player Movement Weapon Handler Player Stats Player Inventory Player Outline Effect Player Footstep Sound Grenade Handler Player Input Head Bobber 보다 자세히 보려면 아래 링크의 프로젝트를 열어보면 되겠다. http..

    유니티 GameObject.FindGameObjectWithTag("Player")

    GameObject.Find() 보다 빠르겠다. 태그로 검색하니까. 참고 문서 https://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html Unity - Scripting API: GameObject.FindGameObjectsWithTag Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close do..

    유니티 Billboard Renderer 직접 구현할 필요가 없다

    유니티 Billboard Renderer 직접 구현할 필요가 없다

    지금까지는 아래 코드와 같이 billboard를 직접 구현해서 썻는데 검색해 보니까 billboard renderer 라는 컴포넌트가 있더라! public class CameraFacingBillboard : MonoBehaviour { private Camera m_Camera; private Transform m_Transform; private void Awake() { m_Camera = Camera.main; m_Transform = transform; } void Update() { m_Transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.forward, m_Camera.transform.rotation * Ve..

    유니티 GetChild() vs GameObject.Find() 어느 것이 속도가 빠를까.

    유니티 GetChild() vs GameObject.Find() 어느 것이 속도가 빠를까.

    구글링을 해보았더니, 나와 똑같은 의문을 가진 개발자가 있었다. 유니티 포럼에서도 여러 의견이 나뉘는데, 내가 봤을 때는 1 => 2 => 3 순으로 느리다. 따라서 유니티 인스펙터에 컴포넌트를 걸어두고 사용하자! 참고 문서 https://docs.unity3d.com/ScriptReference/Transform.GetChild.html Unity - Scripting API: Transform.GetChild If the transform has no child, or the index argument has a value greater than the number of children then an error will be generated. In this case "Transform child o..

    유니티 Camera.main은 캐싱해서 쓰자

    아래 코드와 같이 Camera.main을 매번 호출할 필요는 없다. Start()에서 미리 Camera.main을 Camera 변수에 담아놓고 다른 함수에서 불러쓰는 것이 좋겠다. 성능 상 큰 문제는 아니지만, 성능을 고려하자면 캐싱해 놓고 써야겠다. public class Example : MonoBehaviour { //This is Main Camera in the Scene Camera m_MainCamera; //This is the second Camera and is assigned in inspector public Camera m_CameraTwo; void Start() { //This gets the Main Camera from the Scene m_MainCamera = Camer..

    유니티 [ExecuteInEditMode]로 플레이 하지 않은 상태에서 값 변경하기

    해당 스크립트가 유니티 에디트 모드에서도 동작하도록 설정합니다. [ExecuteInEditMode] // 스크립트가 에디터모드에서 동작하도록 설정 public class CameraControl : MonoBehaviour { } 참고 문서 https://docs.unity.cn/kr/2017.4/ScriptReference/ExecuteInEditMode.html UnityEngine.ExecuteInEditMode - Unity 스크립팅 API Makes all instances of a script execute in edit mode. docs.unity.cn

    유니티 인스펙터 창에 속성들 구분하는 [Header()]

    유니티 인스펙터 창에 속성들 구분하는 [Header()]

    클래스의 속성들(멤버 변수)을 관리하기 편하게 구분해 주는 header가 있습니다. 아래 코드와 같이 구분 하면 인스펙터 창을 그룹화 해줄 수 있습니다. [System.Serializable] public class CameraSettings { [Header("-Positioning-")] public Vector3 m_CamPositionOffsetLeft; public Vector3 m_CamPositionOffsetRight; [Header("-Camera Options-")] public Camera m_UICamera; // UI 용 카메라 public float m_MouseXSensitivity = 5.0f; // 마우스 감도 public float m_MouseYSensitivity = ..

    Unity Addressable Asset System 좋은 글 링크

    https://gist.github.com/MeowKim/904087f7c2b372a5df72a0925add85d6 Unity Addressable Asset System 가이드 Unity Addressable Asset System 가이드. GitHub Gist: instantly share code, notes, and snippets. gist.github.com

    Unity 2021 에서 auto-refresh 기능 끄기

    Unity 2021 에서 auto-refresh 기능 끄기

    Edit => Preferences => Asset Pipeline => Auto Refresh => Disabled

    [Side Project] DivisionLike v0.1.0 with Unity engine

    https://youtu.be/qlCFAl2lha8 https://github.com/ddayin/Unity-DivisionLike GitHub - ddayin/Unity-DivisionLike: develop a game like Tom Clancy's The Division by using Unity develop a game like Tom Clancy's The Division by using Unity - GitHub - ddayin/Unity-DivisionLike: develop a game like Tom Clancy's The Division by using Unity github.com 사이드 프로젝트 같이 하실 분 구합니다. 클라, 서버, 디자이너, 기획 무엇이든 좋습니다.