Everyday Unity – Telegram
Everyday Unity
1.1K subscribers
157 photos
59 videos
42 files
2.36K links
A game developer and tech lead in a top grossing company posting Unity, programming, and gamedev related stuff that I find interesting
Website: https://gamedev.center

Most used tags are:
#performance
#shader
#interview

Author: @alexmtr
Download Telegram
It is common to see UIs with areas constructed of many
overlaid elements. A good example of this might be a
card Prefab in a card-battler game. While this approach
allows for a lot of customization in designs, it can
greatly impact performance with lots of pixel overdraw.
Furthermore, it may result in more draw batches.
Determine if you can merge many layered elements into
fewer (or even one) elements.

#ui #tips #overdraw
Mask and RectMask2D components are commonly
found in UI. Mask utilizes the render target’s stencil
buffer to draw or reject the pixels being drawn, bearing
the cost almost entirely on the GPU. In contrast,
RectMask2D performs bounds-checking on the CPU
to reject elements outside of the mask. Complex UIs
with lots of RectMask2D components, especially when
nested, can incur significant CPU costs in performing
the bounds checks. Take care not to use excessive
numbers of RectMask2D components, or if GPU load is
less than CPU load, consider whether it is preferable to
switch to Mask components to balance the overall load.

#ui #tips #mask #rectmask2d
In most cases, mipmaps are not required on UI textures,
so ensure that this Import Setting is disabled on them
unless you specifically require it (for world-space UI,
for instance).

#ui #tips #mipmaps
Be sure to disable the Raycast Target option on UI
Graphic elements that don’t need to receive input
events. Many UI elements don’t need to receive input
events, such as the text on a button or non-interactive
images. However, UI Graphic components have the
Raycast Target option enabled by default. Complex UIs
could potentially have a large number of unnecessary
Raycast Targets, so disabling them can save significant
amounts of CPU processing.

#ui #tips #raycasttarget
Steps to create a native Android plugin for Unity in Java using Android Studio

A very simple and thorough article about how to create your fist native android plugin for Unity

https://markcastle.com/steps-to-create-a-native-android-plugin-for-unity-in-java-using-android-studio-part-1-of-2/

https://markcastle.com/steps-to-create-a-native-android-plugin-for-unity-in-java-using-android-studio-part-2-of-2/

#native #plugin #android