Engine 120

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 ..

Engine/Unity 2023.08.14

플러그인 에셋 소개 : 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

Engine/Unity 2023.02.12

유니티 에셋 스토어 장바구니에 하나 담다 : 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

Engine/Unity 2023.02.12

유니티 인스펙터 상에 보이지 않도록 [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..

Engine/Unity 2023.02.12

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

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

Engine/Unity 2023.02.12

유니티 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..

Engine/Unity 2023.02.11

유니티 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..

Engine/Unity 2023.02.11

유니티 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..

Engine/Unity 2023.02.11