Today I focus on some optimizations related to the UI

Let’s talk about the canvas, only the main element of the interfaces, it often happens to see only one canvas inside all the types of elements that represent the game UI.
This does not help from the point of view of resources because every time a change occurs in the UI the whole canvas is reinitialized to update.
A solution to consider could be to split the UI and create a more dedicated canvas.

A second trick concerns the components within the canvas, many UI objects have the ability to be selected, not just buttons, and for this, they have a component that allows them to receive a raycast. The solution to avoid overlapping is to check the single components and deactivate the “Raycast Target” flag.

Speaking of optimization it seems appropriate to dwell on the difference between struct and class.

Let’s start with a small definition of both

A class is a user-defined model or prototype from which objects are created. A class combines fields and methods into a single unit.

A structure is a…

The profiler gives us the tools to find where we are wasting resources, once identified we must understand how to optimize it.

We have already said that the print commands on the console use a lot of resources, especially when they are constantly called in the Update method. We have to pay attention to what we write in the Update. Also in the Coroutines, we should be careful because they are always running.

In the Coroutines, we can optimize the code by removing the keyword ‘new’ and creating beforehand the variables that we need.
The simple step of declaring the variables and initializing them in the Start method allows us to lighten the workload.

When you are working on a very large game the optimization of the code and the use of certain calls over others can make a difference. In a game, this manifests itself initially as a drop in FPS and then comes to a complete stop.

To check where this happens…

An AssetBundle is content that is stored separately from a main game or application and loaded/downloaded at runtime. This helps minimize the impact on network and system resources, allowing customers to download and install only the parts they need. AssetBundles can also be used to update or add content post-release.

The app development course is also completed. This course was one of the most difficult because it took me far outside my comfort zone.

Using AWS was really very interesting, creating AssetBundle a completely new discovery.

I’m more and more satisfied with the choice I made several months ago, I’ve really found the desire to get back into gaming. The next course is about optimization and what we could call best practices for the development of a video game.

When the initial settings are finished, let’s proceed with the project, but first, let’s explain better what Vuforia does

Vuforia is an augmented reality software development kit (SDK) for mobile devices that enables the creation of augmented reality applications.[1] It uses computer vision technology to recognize and track planar images…

The third app I’m going to develop is not the usual app but it exploits a technology that is finding several uses in the working field.
Augmented Reality, or AR for short, has been used for a long time. In this case, I will use Vuforia.

With the change to the package manager, Vuforia is no more a package to be added during the installation of the engine as in Android. You only have to look for it in the Package Manager, install it and when the pop-up appears, read the contract and accept it.

Also in this application, just to get familiar with it, we are going to set up Unity Analytics to monitor which exhibits will be viewed the most.

Let’s note that using the free version of Unity I won’t be able to access the data in real-time. …

The development of the second app in this course continues. And the main topic of the development of this app is just ScriptableObjects.

Scriptable Objects are amazing data containers. They don’t need to be attached to a GameObject in a scene. They can be saved as assets in our project…

Andrea Alicino

project manager by day, unity developer by night

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store