GameDev.[Unity](4)
-
[Unity3D] The world most simple MotionTrail effect
All you need to do is just attach the MotionTrailGenerator.cs to a GameObject with a SkinnedMeshRenderer on it. Just call the On() & Off() methods.
2022.11.16 -
[UnityEngine] UI 선택에 따른 Canvas의 SortingOrder를 재정렬 하는 방법
유저가 팝업창들을 선택할때에 정렬순서를 바꿔주는 기능을 UnityEngine 에서 구현해보자. 여러 팝업UI 들을 패널로 만들어놓고 하나의 Canvas안에 다 넣어놓는 형태는 성능에 좋지않다. Canvas 는 이벤트가 발생할때마다 모든 자식들을 갱신한다. 특히나 ScrollView, Slider 등의 마우스 드래그 처럼 매우많은 이벤트가 발생하는 CanvasRenderer 들은 최대한 Canvas 단위로 잘 분류해서 불필요한 CanvasRenderer 들이 갱신되지 않도록 해 주어야 한다. 그래서 이번 포스팅에서는 장비창, 인벤토리창을 별도의 Canvas로 두고, CanvasManager를 통해 이벤트를 처리하면서 각 Canvas의 SortingOrder 를 재정렬 하도록 해본다. 보통 간단한 UI 팝업..
2022.10.13 -
[UnityEngine] CustomEditor for inheritance
Unity's custom editor dose not support member fields of parent type. So, to show member fields of inherited class on inspector view, I also inherited custom editor for parent class's custom editor. Here some test classes below, I would like to draw a ObjectField that would refers DummyData on [Child] component's inspector view. First, make a Editor for [Parent], define static generic method draw..
2022.10.11 -
Unity DOTS - how to check entity is null.
Normally , We check entity is null or not with EntityManager. Unity documents and also many of developers explaine like this way Accessing to entityManager to check if entity is null. So when you want to check all entities are null, then you have to access entityManager many times in for loop. However, when you take a look the Entity class, Entity includes Null static variable. So, at first, I d..
2021.08.07