If you are using collision callbacks, enable the Reuse
Collision Callbacks option. This will avoid managed
allocations on each callback by reusing a single internal
Collision object during callbacks, rather than creating
a new one for each callback. As well, when using
callbacks, be mindful of doing complex work during
them, as this can really add up in heavy scenes with a
lot of collision events. Adding Unity Profiler markers to
your callbacks will make them visible and easier to track
down should they become a performance problem.
#physics #tips
Collision Callbacks option. This will avoid managed
allocations on each callback by reusing a single internal
Collision object during callbacks, rather than creating
a new one for each callback. As well, when using
callbacks, be mindful of doing complex work during
them, as this can really add up in heavy scenes with a
lot of collision events. Adding Unity Profiler markers to
your callbacks will make them visible and easier to track
down should they become a performance problem.
#physics #tips
Be careful if you are manually updating Animators because they normally use
Unity’s Job System to process in parallel but manual updates force them to process on
the Main thread.
#animation #tips
Unity’s Job System to process in parallel but manual updates force them to process on
the Main thread.
#animation #tips
Animators are primarily intended for humanoid characters, but are often used to
animate single values (e.g., the alpha channel of a UI element). Although Animators
are convenient to use for their state machine flow, this is a relatively inefficient use
case. Internal benchmarks show that on a device such as a low-end iPhone 4S, the
performance of Animators beats that of Legacy Animation only when around 400 curves
are being animated.
#animation #tips
animate single values (e.g., the alpha channel of a UI element). Although Animators
are convenient to use for their state machine flow, this is a relatively inefficient use
case. Internal benchmarks show that on a device such as a low-end iPhone 4S, the
performance of Animators beats that of Legacy Animation only when around 400 curves
are being animated.
#animation #tips
Avoid relying on more Unity Camera components than
you really need to achieve your rendering. For example,
it is not uncommon to find projects that use several
cameras to build up UI layers. Each Camera component
incurs overhead whether it does any meaningful work
or not. On more powerful target platforms this might be
negligible, but on lower-end or mobile platforms this can
be up to 1 ms of CPU time each.
#rendering #tips
you really need to achieve your rendering. For example,
it is not uncommon to find projects that use several
cameras to build up UI layers. Each Camera component
incurs overhead whether it does any meaningful work
or not. On more powerful target platforms this might be
negligible, but on lower-end or mobile platforms this can
be up to 1 ms of CPU time each.
#rendering #tips
Avoid too many dynamic lights when you use forward
rendering. Every dynamic light adds a new render pass
for every illuminated object.
#rendering #tips #lighting
rendering. Every dynamic light adds a new render pass
for every illuminated object.
#rendering #tips #lighting
Try to avoid Layout Groups where possible, especially
if your content isn’t really dynamic. In cases where
Layout Groups are only used to perform the initial layout
of content, which subsequently doesn’t change, then
consider adding some custom code to disable those
Layout Group component(s) after the content has
been initialized.
#ui #tips #layout
if your content isn’t really dynamic. In cases where
Layout Groups are only used to perform the initial layout
of content, which subsequently doesn’t change, then
consider adding some custom code to disable those
Layout Group component(s) after the content has
been initialized.
#ui #tips #layout
List and Grid views are another common UI pattern (e.g.,
inventory or shop screens). In such cases, where there
may be hundreds of items with only a small number
visible at once, don’t create UI elements for them all, as
it will be very expensive. Instead, implement a pattern
to reuse elements and bring them into view on one side
as they move off the other side. A Unity engineer has
provided an example in this GitHub project.
Repo: https://github.com/boonyifei/ScrollList
#ui #tips #scrollrect
inventory or shop screens). In such cases, where there
may be hundreds of items with only a small number
visible at once, don’t create UI elements for them all, as
it will be very expensive. Instead, implement a pattern
to reuse elements and bring them into view on one side
as they move off the other side. A Unity engineer has
provided an example in this GitHub project.
Repo: https://github.com/boonyifei/ScrollList
#ui #tips #scrollrect
GitHub
GitHub - boonyifei/ScrollList: Optimizing the scroll list
Optimizing the scroll list. Contribute to boonyifei/ScrollList development by creating an account on GitHub.
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
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
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
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
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
Экспериментальное API для модификации контактов в Unity
https://dtf.ru/s/gamedevnews/165731-eksperimentalnoe-api-dlya-modifikacii-kontaktov-v-unity
#physics #contact #points
https://dtf.ru/s/gamedevnews/165731-eksperimentalnoe-api-dlya-modifikacii-kontaktov-v-unity
#physics #contact #points
DTF
Экспериментальное API для модификации контактов в Unity
Модификация контактов - это о настройке реакции на контакты. Такую фичу просили на протяжении многих лет. PhysX предложил эту функциональность некоторое время назад, но из-за внутренних деталей реализации было сложно вытащить это на уровень скриптов в Unity.…
Iridescent shader breakdown. I recently made an iridescent shader
https://medium.com/@sunnless/iridescent-shader-breakdown-c87ec5fe1e2a
#iridiscent #shader
https://medium.com/@sunnless/iridescent-shader-breakdown-c87ec5fe1e2a
#iridiscent #shader
Medium
Iridescent shader breakdown
I recently made an iridescent shader inUnity using shaderlab and hlsl. I decided to apply it to my illustration of the seven of swords…
Cracking BattlEye packet encryption | secret club
https://secret.club/2020/06/19/battleye-packet-encryption.html
#battleye #incryption #hack
https://secret.club/2020/06/19/battleye-packet-encryption.html
#battleye #incryption #hack
secret club
Cracking BattlEye packet encryption
Recently, Battlestate Games, the developers of Escape From Tarkov, hired BattlEye to implement encryption on networked packets so that cheaters can’t capture these packets, parse them and use them for their advantage in the form of radar cheats, or otherwise.…
Unity Standalone Profiler
https://thegamedev.guru/unity-performance/profiling-standalone-mode/
#standalone #profiler
https://thegamedev.guru/unity-performance/profiling-standalone-mode/
#standalone #profiler
The Gamedev Guru
Profiling Can Now Be As Smooth As Silk - The Gamedev Guru
How to profile and work on the editor at the same time without affecting your results with the Unity Standalone Profiler
UnityTip: PIX 2006.26 Is Released & Use PIX To Debug Graphics API Calls Of A Unity Game
For Unity developers, you can use PIX to debug Windows 64-bit Standalone or UWP (Universal Windows Platform) applications.
https://medium.com/chenjd-xyz/unitytip-pix-2006-26-is-released-use-pix-to-debug-graphical-instructions-of-a-unity-game-d3731c83ccd0
#profiler #windows
For Unity developers, you can use PIX to debug Windows 64-bit Standalone or UWP (Universal Windows Platform) applications.
https://medium.com/chenjd-xyz/unitytip-pix-2006-26-is-released-use-pix-to-debug-graphical-instructions-of-a-unity-game-d3731c83ccd0
#profiler #windows
Medium
UnityTip: PIX 2006.26 Is Released & Use PIX To Debug Graphics API Calls Of A Unity Game
PIX is a performance tuning and debugging tool provided by Microsoft for Windows developers. It provides a variety of modes to analyze the…
How to Automate Unity Building.
Super basic article about ci/cd.
https://medium.com/@elijahlopezz/automating-unity-building-9899836aaa01
#ci #cd
Super basic article about ci/cd.
https://medium.com/@elijahlopezz/automating-unity-building-9899836aaa01
#ci #cd
Medium
Automating Unity Building
It took me hours to figure out how to create a simple build noscript in Unity, here’s what you need to know about automating building.
Practical PlayMode Testing in Unity3D
A very basic article about playmode tests
https://medium.com/xrpractices/practical-playmode-testing-in-unity3d-5ea455bf28b0
#testing #playmode
A very basic article about playmode tests
https://medium.com/xrpractices/practical-playmode-testing-in-unity3d-5ea455bf28b0
#testing #playmode
Medium
Practical PlayMode Testing in Unity3D
Automation Tests are an integral part of the Software Development Life Cycle (SDLC). The Unity Test Framework (UTF) enables Unity Users to…
Reading Google Sheets - Unity Connect
https://connect.unity.com/p/reading-google-sheets
#google #sheets
https://connect.unity.com/p/reading-google-sheets
#google #sheets
Unity Connect
Reading Google Sheets - Unity Connect
Getting Started