[Unity Tip] 3. 오브젝트 풀링(Object Pooling)

Object Pool e1691417493886

오브젝트 풀링이란? Unity에서 게임을 개발할 때 일명 “소환” 이라는 기능을 구축해야 할 상황이 많이 놓여집니다. 일반적으로는 이럴때 Instantiate 라는 함수를 사용해 게임 오브젝트를 생성하곤 하는데요, 소규모의 게임 프로젝트에서는 괜찮겠지만, 게임의 규모가 커질수록 객체를 생성하는 행위는 게임 성능에 악영향을 미칠 수 있습니다. 그래서 대게 Programming Strategy(전략) 중 하나인 오브젝트 풀링 이라는 기술을 사용해줍니다. 오브젝트 풀링은 미리 … Read more

[Unity Tip] 2. Target 겨냥하기 (1-1)

image 5 e1691205505424

Unity에서 Target 겨냥하기 Unity 게임 개발을 하시는 분이라면, 몬스터, 혹은 물체를 인식하여 자동으로 Aim 및 Targeting하는 상황을 생각보다 자주 마주합니다. 그렇다면, 어떻게 물체가 타겟을 겨냥하는지 Tower 오브젝트를 활용해 간단히 배워보도록 하겠습니다. [유니티 URP에서 분홍 프리팹 해결하는 방법] 물리적 충돌 Collider 오브젝트 생성하기 우선 Zone1이라는 오브젝트를 Tower prefab안에 만들어줍니다. Zone1의 속성값은 위 사진처럼, 스피어 콜라이더와 하나의 … Read more

[Unity Tip] 1. How to fix pink prefabs when using URP.

image 32 e1689861085280

What is URP and why does the issue occur? In Unity’s Universal Render Pipeline (URP), pink (magenta) materials or textures are often referred to as “missing shader” or “missing material” indicators. This happens in URP due to differences in the rendering pipeline and shader compatibility between URP and the built-in Unity renderer. The Universal Render … Read more