Learn How to Use the Unity Profiler By Example
A very basic example how to profile your code and how to combine a few meshes into one through the code.
https://gamedevunboxed.com/learn-how-to-use-the-unity-profiler-by-example/
#profiling #optimization #mesh #combine
A very basic example how to profile your code and how to combine a few meshes into one through the code.
https://gamedevunboxed.com/learn-how-to-use-the-unity-profiler-by-example/
#profiling #optimization #mesh #combine
Making Sense of FixedUpdate, Update, and LateUpdate
A basic article about different Updates in Unity and when to and not to use them
https://letsbuild.gg/rcarlson/making-sense-of-fixedupdate-update-and-lateupdate-1p19
#update
A basic article about different Updates in Unity and when to and not to use them
https://letsbuild.gg/rcarlson/making-sense-of-fixedupdate-update-and-lateupdate-1p19
#update
How to make a Bridge Building Game in Unity
Tutorial how to make a game in 1 hour video
https://letsbuild.gg/urocksgamedev/how-to-make-a-bridge-building-game-in-unity-208e
#game #tutorial
Tutorial how to make a game in 1 hour video
https://letsbuild.gg/urocksgamedev/how-to-make-a-bridge-building-game-in-unity-208e
#game #tutorial
Lets Build Community
How to make a Bridge Building Game in Unity
Overview In this two-part tutorial series, we will be creating a 2d bridge building game,...
5 more things about enums in C#
https://www.code4it.dev/blog/5-more-things-about-enums-csharp
you can change the underlying type to short, uint and similar;
you can also define negative values;
inside the enum definition, you can create values that represent the union of other two (or more);
by default, .NET APIs return enum values as numbers; to fix it, you must add a configuration in your Startup class;
you can also omit the Flags attribute; the downside is that when you print the value of a variable that is the union of 2 enums, the returned string is the sum of the enums stored inside that variable, not the string representation.
#csharp #enum #flags
https://www.code4it.dev/blog/5-more-things-about-enums-csharp
you can change the underlying type to short, uint and similar;
you can also define negative values;
inside the enum definition, you can create values that represent the union of other two (or more);
by default, .NET APIs return enum values as numbers; to fix it, you must add a configuration in your Startup class;
you can also omit the Flags attribute; the downside is that when you print the value of a variable that is the union of 2 enums, the returned string is the sum of the enums stored inside that variable, not the string representation.
#csharp #enum #flags
Code4IT
5 more things you should know about enums in C#
We’ve already seen some of the things you should know about enums in C#. Here we’ll dive into Flagged enumerations, serialization and so on.
10000 Update() calls - Unity Technologies Blog
Old but gold. Performance cost of calling unity magic methods and when you should think about using a custom update manager to save execution time.
https://blogs.unity3d.com/2015/12/23/1k-update-calls/
#performance
Old but gold. Performance cost of calling unity magic methods and when you should think about using a custom update manager to save execution time.
https://blogs.unity3d.com/2015/12/23/1k-update-calls/
#performance
Unity
Unity Blog
Check out the latest Unity news, product announcements, content, creator success stories, and more
Progressing in Circles
A great article on different approaches for a circular progress bar with rough performance comparisons. All examples are provided with shaders.
https://medium.com/@bgolus/progressing-in-circles-13452434fdb9
#shader #progress #bar #circular
A great article on different approaches for a circular progress bar with rough performance comparisons. All examples are provided with shaders.
https://medium.com/@bgolus/progressing-in-circles-13452434fdb9
#shader #progress #bar #circular
Medium
Progressing in Circles
Exploring shader based circular progress bars for Unity games
Preload Audio Data & How Unity Decides Which Audio Assets to Load to a Scene
The audio clip can be marked for preload in the import settings.
Preloaded audio clips are loaded with the scene when referenced on any gameobject in this scene.
https://medium.com/double-shot-audio/preload-audio-data-how-unity-decides-which-audio-assets-to-load-to-a-scene-a440a654e7e2
#audio #preload
The audio clip can be marked for preload in the import settings.
Preloaded audio clips are loaded with the scene when referenced on any gameobject in this scene.
https://medium.com/double-shot-audio/preload-audio-data-how-unity-decides-which-audio-assets-to-load-to-a-scene-a440a654e7e2
#audio #preload
Medium
Preload Audio Data & How Unity Decides Which Audio Assets to Load to a Scene
Today we’ll be talking about the Preload Audio Data option in Unity’s Audio Import Settings and why it’s important for your game.
Placing Objects on a Spline, Part I — Calculating the Arc-Length of a Spline
https://medium.com/@lucasecardoso/placing-objects-on-a-spline-part-i-calculating-the-arc-length-of-a-spline-aa6e90325a2b
#bezier #spline #curve
https://medium.com/@lucasecardoso/placing-objects-on-a-spline-part-i-calculating-the-arc-length-of-a-spline-aa6e90325a2b
#bezier #spline #curve
Medium
Placing Objects on a Spline, Part I — Calculating the Arc-Length of a Spline
While working on Peggle-inspired roguelike Peglin, it came to our attention that Peggle features these great looking puzzle designs with…
Burst User Guide | Burst | 1.3.0
Burst docs and in-depth denoscription of optimization technics
https://docs.unity3d.com/Packages/com.unity.burst@1.3/manual/index.html#unityburstintrinsics
#burst #dots #jobs
Burst docs and in-depth denoscription of optimization technics
https://docs.unity3d.com/Packages/com.unity.burst@1.3/manual/index.html#unityburstintrinsics
#burst #dots #jobs
Curving Corner Texture UVs · Brook Miles
Example how to curve a texture by adding additional triangles and calculating UVs for it
http://brookmiles.ca/2020/05/25/curving-corner-texture-uvs/
Example project: https://github.com/brookmiles/curved-corner-uvs
#shader #curve #texture #uv
Example how to curve a texture by adding additional triangles and calculating UVs for it
http://brookmiles.ca/2020/05/25/curving-corner-texture-uvs/
Example project: https://github.com/brookmiles/curved-corner-uvs
#shader #curve #texture #uv
brookmiles.ca
Curving Corner Texture UVs
About 4 years ago while working on Griftlands I had a rendering problem that I didn’t solve to my satisfaction: I wanted to smoothly curve a repeating texture around a corner for shorelines, as well as transitions between different ground materials.
What…
What…
How To Render 10,000 Animated Characters With 20 Draw Calls In Unity
https://medium.com/chenjd-xyz/how-to-render-10-000-animated-characters-with-20-draw-calls-in-unity-e30a3036349a
#gpu #animation #texture #instancing
https://medium.com/chenjd-xyz/how-to-render-10-000-animated-characters-with-20-draw-calls-in-unity-e30a3036349a
#gpu #animation #texture #instancing
Medium
How To Render 10,000 Animated Characters With 20 Draw Calls In Unity
This is an English translation of a blog I wrote in Chinese in 2017. Although the original blog was a few years ago, I found this article…
Unity - Manual: GPU instancing
Tip: When writing shader noscripts, always use UnityObjectToClipPos(v.vertex) instead of mul(UNITY_MATRIX_MVP,v.vertex).
https://docs.unity3d.com/Manual/GPUInstancing.html
#shader #gpu #instancing #manual
Tip: When writing shader noscripts, always use UnityObjectToClipPos(v.vertex) instead of mul(UNITY_MATRIX_MVP,v.vertex).
https://docs.unity3d.com/Manual/GPUInstancing.html
#shader #gpu #instancing #manual
Unity UI Performance tips - Sharing my findings
Limit the usage of 'Best Fit' and 'Rich Text' in Text components
Don't use dyanmic, use bitmap/static fonts if possible
Limit the usage of Outline/Shadow components on Text game objects. Bake the effect in the bitmap font instead
Stick to 'simple' sprites if possible. Avoid large 'tiled' sprites
Flatten out the transform hierarchy. The more nesting the more transform calculations needed to position children correctly
Uncheck "Pixel Perfect" in the Canvas settings. Big performance hitter.
Screen Space Overlay UI is slightly faster than Screen Space Camera. In Overlay the UI is drawn on top of the screen immediately avoiding all the culling and sorting that Camera space has to go through. (The performance hit shouldn't be that critical, and Screen Space Camera is convenient though, so maybe go with Camera and see if it causes you issues down the line)
Avoid stacking UI images/text on top of each other to best of your ability. This causes more overdraw and will slow things down
Subdivide your UI to multiple canvases based on what's static vs dynamically moving. Changing the position/rotation/scale/sprite/text of a UI element in a canvas causes a rebuild of the canvas' mesh for all its children. So having a single Canvas for the entire UI of your game is not a great idea. Divide it into logical groups that update/change together. e.g. Maybe each menu/screen/subscreen/popup has its own Canvas, maybe the hud top has a canvas vs the hud's bottom, etc.
General tip: Avoid Camera.main calls as it does Object.FindObjectWithTag every time it's accessed! Have a direct reference to the camera you're using instead.
Prefer enabling/disabling the canvas itself instead of the entire gameobject. Avoiding OnEnable/OnDisable callbacks on the entire hierarchy which could be expensive.
Avoid LayoutGroups. Roll out your own (see linked video for more details)
Updated pooled objects properties first before enabling it when borrowing an object from the pool. This avoids unnecessary dirtying of the object's hierarchy
With ScrollRects with many items, attach a Canvas (with no Pixel Perfect) to the scroll rect so that scrolling the items won't dirty out the elements in the outer canvases
Pool the items in the view. enable/disable elements as they get in/out of view
Clamp the velocity of the scrollview so that you don't end up with very small deltas making very small changes to your elements without it being apprently changing on screen
Turn off Raycast Target for static or non-interactive elements. This reduces the number of UI objects the collision/click/input raycast checker has to go through to determine what UI elements should receive events
Take out GraphicsRaycaster components from Canvases that don't require input events
Pack your sprites together to reduce drawcalls. Use Texture Packer or Unity's atlas/packer systems
https://forum.unity.com/threads/unity-ui-performance-tips-sharing-my-findings.524916/
#ui #performance #optimization #tips
Limit the usage of 'Best Fit' and 'Rich Text' in Text components
Don't use dyanmic, use bitmap/static fonts if possible
Limit the usage of Outline/Shadow components on Text game objects. Bake the effect in the bitmap font instead
Stick to 'simple' sprites if possible. Avoid large 'tiled' sprites
Flatten out the transform hierarchy. The more nesting the more transform calculations needed to position children correctly
Uncheck "Pixel Perfect" in the Canvas settings. Big performance hitter.
Screen Space Overlay UI is slightly faster than Screen Space Camera. In Overlay the UI is drawn on top of the screen immediately avoiding all the culling and sorting that Camera space has to go through. (The performance hit shouldn't be that critical, and Screen Space Camera is convenient though, so maybe go with Camera and see if it causes you issues down the line)
Avoid stacking UI images/text on top of each other to best of your ability. This causes more overdraw and will slow things down
Subdivide your UI to multiple canvases based on what's static vs dynamically moving. Changing the position/rotation/scale/sprite/text of a UI element in a canvas causes a rebuild of the canvas' mesh for all its children. So having a single Canvas for the entire UI of your game is not a great idea. Divide it into logical groups that update/change together. e.g. Maybe each menu/screen/subscreen/popup has its own Canvas, maybe the hud top has a canvas vs the hud's bottom, etc.
General tip: Avoid Camera.main calls as it does Object.FindObjectWithTag every time it's accessed! Have a direct reference to the camera you're using instead.
Prefer enabling/disabling the canvas itself instead of the entire gameobject. Avoiding OnEnable/OnDisable callbacks on the entire hierarchy which could be expensive.
Avoid LayoutGroups. Roll out your own (see linked video for more details)
Updated pooled objects properties first before enabling it when borrowing an object from the pool. This avoids unnecessary dirtying of the object's hierarchy
With ScrollRects with many items, attach a Canvas (with no Pixel Perfect) to the scroll rect so that scrolling the items won't dirty out the elements in the outer canvases
Pool the items in the view. enable/disable elements as they get in/out of view
Clamp the velocity of the scrollview so that you don't end up with very small deltas making very small changes to your elements without it being apprently changing on screen
Turn off Raycast Target for static or non-interactive elements. This reduces the number of UI objects the collision/click/input raycast checker has to go through to determine what UI elements should receive events
Take out GraphicsRaycaster components from Canvases that don't require input events
Pack your sprites together to reduce drawcalls. Use Texture Packer or Unity's atlas/packer systems
https://forum.unity.com/threads/unity-ui-performance-tips-sharing-my-findings.524916/
#ui #performance #optimization #tips
Unity - Scripting API: Graphics.DrawMeshInstancedIndirect
Difference between Graphics.DrawMeshInstancedIndirect and Graphics.DrawMeshInstanced with examples
https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html
#gpu #instancing
Difference between Graphics.DrawMeshInstancedIndirect and Graphics.DrawMeshInstanced with examples
https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html
#gpu #instancing
Chapter 2. Animated Crowd Rendering | NVIDIA Developer
https://developer.nvidia.com/gpugems/gpugems3/part-i-geometry/chapter-2-animated-crowd-rendering
#gpu #animation #instancing
https://developer.nvidia.com/gpugems/gpugems3/part-i-geometry/chapter-2-animated-crowd-rendering
#gpu #animation #instancing
NVIDIA Developer
Chapter 2. Animated Crowd Rendering
Rider 2020.2 Roadmap - .NET Tools Blog.NET Tools Blog
https://blog.jetbrains.com/dotnet/2020/05/29/rider-2020-2-roadmap/
#rider #roadmap
https://blog.jetbrains.com/dotnet/2020/05/29/rider-2020-2-roadmap/
#rider #roadmap
JetBrains Blog
Rider 2020.2 Roadmap | The .NET Tools Blog
In this post, we’d like to share our plans for Rider 2020.2 and find out what we can do next to improve your development experience. Your feedback is always welcome!The following is a list of our
GPU Spline Deformation in Unity - Roy Theunissen
https://medium.com/@roy.theunissen/gpu-spline-deformation-in-unity-a710f55f210c
Repo: https://github.com/RoyTheunissen/GPU-Spline-Deformation
#mesh #spline #deformation #bezier
https://medium.com/@roy.theunissen/gpu-spline-deformation-in-unity-a710f55f210c
Repo: https://github.com/RoyTheunissen/GPU-Spline-Deformation
#mesh #spline #deformation #bezier
Medium
GPU Spline Deformation in Unity
How to deform any mesh along a spline by leveraging textures
ArtStation - Tileable Liquid Mesh on Spline, Simon Trümpler
https://www.artstation.com/artwork/BmN5G6
#liquid #mesh #vfx
https://www.artstation.com/artwork/BmN5G6
#liquid #mesh #vfx
Arm Guide for Unity Developers Optimizing Mobile Gaming Graphics Version 4.2 – Arm Developer
https://developer.arm.com/docs/100140/0402
#arm #mali #guide #gpu #graphics
https://developer.arm.com/docs/100140/0402
#arm #mali #guide #gpu #graphics
ARM Developer
Arm Guide for Unity Developers Optimizing Mobile Gaming Graphics Version 4.2 – Arm Developer
Unity – Arm Developer
Arm guides for Unity
https://developer.arm.com/solutions/graphics-and-gaming/gaming-engine/unity
#arm #guides #unity
Arm guides for Unity
https://developer.arm.com/solutions/graphics-and-gaming/gaming-engine/unity
#arm #guides #unity
Arm Developer
Unity – Arm Developer
Unity® software is the most popular development software used by developers to create games and applications across multiple platforms. From large publishers to indie studios, students and hobbyists, Unity boasts a thriving community.
GitHub - yasirkula/UnitySimplePatchTool: Unity port of SimplePatchTool library to add patching support to standalone Unity applications
https://github.com/yasirkula/UnitySimplePatchTool
#patch #tool
https://github.com/yasirkula/UnitySimplePatchTool
#patch #tool
GitHub
GitHub - yasirkula/UnitySimplePatchTool: Unity port of SimplePatchTool library to add patching support to standalone Unity applications
Unity port of SimplePatchTool library to add patching support to standalone Unity applications - yasirkula/UnitySimplePatchTool