2022.1

Mobile performance optimization with Adaptive Performance 4.0

Boat Attack starts off with plenty of scalers engaged by the menu scene, which was stabilized before the capture was done. In this example, the temperature rises quickly and the device goes into throttling. Adaptive Performance tries to stabilize the situation and reduce effects on the GPU, as this is clearly the bottleneck. The shadow scalers thereby reduce quality rapidly – but because that’s not enough, both the view distance and resolution decrease as well. The frame rate then stabilizes and the temperature drops. The game is rescued from throttling and its frame rate raises to 60 fps. Layer culling scaler With the layer culling scaler, you can dynamically adjust layer cull distances at runtime. This feature uses the indexer system to make certain decisions, like when and how much to increase or decrease layer cull distances for optimal performance and thermal stability. The sample we ship with Adaptive Performance loops in medium CPU load until it reaches critical frame rates and then decreases the cull distance of layers. The result of this is that the cull distance for layers changes depending on the CPU and GPU load. You can set a different value for the culling distance of each layer so that they scale proportionally. This helps you determine which objects to cull earlier to save performance. For details on how to do this, see the following code sample. Adaptive decals Adaptive decals target visual effects. In Amazing Adventures of Dr. Arm, there is a boss fight scenario that uses many particles and decal projectors. When the mobile device gets hot and throttling is imminent (or already occurring), the number of particles emitted scales down. In this case, less visually important emitters, things like the leaves blowing in the wind, tiny sparks, and other such elements, turn off completely. The scaler also reduces decal distances.

Read More

Detecting performance bottlenecks with Unity Frame Timing Manager

The Frame Timing Manager is a feature that provides frame-level time measurements like total frame CPU and GPU times. Compared to the general-purpose Unity Profiler and Profiler API, the Frame Timing Manager is designed for a very specific task, and therefore comes with a much lower performance overhead. The amount of information collected is carefully limited as it highlights only the most important frame stats. One main reason for leveraging the Frame Timing Manager is to investigate performance bottlenecks in deeper detail. This allows you to determine what curbs your application performance: Is it bound by the main thread or render thread on CPU, or is it GPU-bound? Based on your analysis, you can take further action to improve performance. The dynamic resolution feature supports fixing detected bottlenecks on the GPU side. You can then increase or reduce rendering resolution to dynamically control the amount of work on the GPU. During development, you can even visualize timing in an application HUD, which allows you to have a real-time, high-level mini Profiler built right in your application. This way, it’s always readily available to use. Lastly, you can use the Frame Timing Manager for release mode performance reporting. Based on collected information, you can send statistics to your servers regarding your application’s performance on different platforms for better overall decision-making.

Read More

Unity 2022.1 Tech Stream is now available

Your team’s needs are unique, and we want to give you an extensible Editor that can flex to your workflows, so everyone can work faster together. UI Toolkit is a unified solution for both authoring runtime UI and extending the Editor with custom tools. In 2022.1, we’ve added even more features for tool developers looking to customize the Editor for their teams with UI widgets and custom shapes. We’ve also added the TreeView with multi-column support, new vector drawing APIs to customize the UI element appearance, and we’re progressively making Property Drawers and Property Attributes available, starting with the most commonly used. Connect with us in the forums and let us know how we can help make UI Toolkit even better for you.   We’ve heard you tell us how important Splines are in our forums, and it’s one of the most requested features on our public roadmap.  “I have been researching spline tools… but I don’t know if any of them will provide exactly the functionality that I need and it would become quite costly to buy a bunch just to experiment. So a good built-in spline tool is incredibly important to my project.” In this release, a new Spline authoring framework is available as a package. It’s designed to create and manipulate Splines in-engine, above all by letting programmers extend functionality with tools and custom components such as instantiating geometry and moving along a Spline. It can also work alongside the new Edit modes, and edit Spline points and tangents using the standard editing tools and shortcuts. Keep letting us know what you think in our forums, and see what’s next on the roadmap. We’ve also improved the procedural creation of materials. For creators using code to generate materials, we extended the Material API to all material properties, now supporting keyword states, HDRP’s diffusion profiles and IES lights, enhancing procedural material usage in-Editor or at runtime. Finally, we’ve added a new API for Unity File System, enabling you to create tools for Asset Bundle visualization and analysis that help your team optimize performance. 

Read More