Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So in this video, we're now going to take a look at the profiler.
Profiler is really useful when you wanting to debug a game and you want to know more about what's going
on behind the scenes.
And now the actual game is running.
OK, you can find the profiler on the window sequencing analysis, rather, and profiler.
OK, now you've got a profiler or a profiler standalone.
I'd recommend using the profiler at the moment.
And if this comes up like this now, it does look a little bit intimidating to begin with.
What I'm going to do, I'm actually going to duck this down here and I bring this up like this.
Bring this down so I can see more of what's going on.
By default, it should be ready to record.
OK, if that's not highlighted, just make sure you press that and to maybe the audio, but don't maximize
on play at the moment.
And I'm just going to press play.
OK, then you'll start to see all sorts of business going on here.
OK, here we go.
It's starting to show me exactly what's going on in terms of every frame.
So as soon as I press pause, OK, allows me then to analyze exactly what's going on.
So if you take a look at the timeline at the bottom, this is actually showing me my main thread in
my runda thread, showing me what the actual processes are and what's happening with any one of these.
You can just click on these in order to get a little bit more detail.
All right.
And we'll come to a lot of these later.
Different jobs that's doing.
You can review these how long they're taking in terms of milliseconds, etc. So there's all sorts of
things going on there.
But what I want to focus on at the moment is the draw calls.
OK, so that'll actually be part of my rendering.
So if I click on rendering, it's actually going to show me now.
And he's actually saying draw calls zero.
That's interesting saying that.
Um.
To make sure that we go, that's better.
All right.
I don't think I was I had not been selected on the screen.
So you do have to select something.
So the moment I got 25, Dracul.
So a lot of these objects are now being basically separated and to draw close.
And where we say static batching batched locals were on zero, but means that it takes a bunch of objects
and sticks them all together in one group and it saves draw cork's.
OK.
And it's rendering the total of one point 8000 triangles, two point 9000 vertices.
That's what's in our scene set.
Pascals is three.
So in the words, how many separate elements are there?
There's the ground.
There's these there's the trees.
OK.
What that means is basically any item with a separate material since all these items of an.
The same material because it's texture.
They all come under one set, Pascall the trees are using the different material and the ground is using
the different material.
Can't use textures.
We're only have three taking up a total of one hundred and six point eight megabytes in memory, or
at least video ram render textures at the moment.
Just six, up to 34 megabytes.
OK, as it gives you loads of great information, it also displays is a visual guide as to what's happening
in terms of your rendering.
So you can see exactly how many milliseconds it's taken to render.
What we can also see under our CPU is the time in which rendering is plain scripts.
There aren't any scripts at the moment and physics animations, garbage collection, V Sync switch,
v sync after that should be zero global illumination, UI and all this.
So most of it at the moment is taken up with others and rendering.
So you can actually switch some of these off.
So, for example, I switch all of these off.
So I'm just left with rendering and others.
And you can see there was no change.
So all of those with nothing for switch of the off.
This is what's left in our rendering.
Now, the others, I'm not entirely sure.
Covid in this.
Well, rendering is is our main concern at the moment.
And so we can see this relatively low.
You can actually use your slide or at the bottom to move out, and it's got these little caps on the
end.
So you can actually bring these and just make sure you're actually clicked on the item that you want
to see.
It only gives us that.
That was when I actually started.
That's when we pulled it.
So there's no other elements to see the.
OK.
You also have memory as well, if I can see a spike in memory happening right there.
Some things happened at that particular point in time, so you might want to memory and find out exactly
what's going on there.
And we get our different audio.
For some reason, we've got some sort of audio going on, any kind of video devices.
We've got no video rendering, any kind of physics elements.
We've got no physics in there at the moment other than the box collider.
Physics to the network in messages, if you're doing anything online.
Network operations, once again, if it's online, UI is a user interface, any kind of 2D graphics
that are on the screen.
We don't really have any of that at the moment, even though we're getting these very, very tiny spikes
and then global illumination.
Wow.
This is basically all of the lighting since we actually have a directional light in there at the moment.
Presumably most of this is coming from the way it's interacting with these objects.
And then virtual texturing.
OK.
So as part of our rendering, then we've got a drawer full of 25.
Let's remember that.
I know.
Want to do switch this off.
I want to take all of these blue elements.
Just hold shift and click on this one and the want to drag them onto ground.
So I'm going to parent them to the ground.
The same with all these just shift.
Let's drag them all onto the ground.
OK.
In this way, we can then close down the ground and thus all of these items parented.
So now click on ground.
And I can now choose static basically means that these objects will not move.
I'm going to say you change the children.
That changes all of the subelements.
That's all of those.
OK, and what it's done is basically to take to all of these items on all these items are basically
meant to optimize the performance.
If an object doesn't move, always market is static, OK, because otherwise unity is going to pay special
attention to the object, thinking it's going to change position from frame to frame.
And it never will.
If it's static, it knows it's always going to be in place, then it can do its optimization stuff.
So wherever we've got these animators who probably have it on, all of them, some signal shift.
OK.
When you get something like that, it basically means you can't select multiple different types, just
all these mobile tombs.
And you can right click on the animation, choose remove component.
Same with all of these just right click remove component.
Don't need any animations, trees, right click remove component and the first tree right click remove
component.
Mobile on alert.
All right, that's great.
Now, on all of these items at the moment, we're going to leave the cash to those who receive shadow
zone.
Later, we're going to switch those off.
All right.
The reason why we're leaving them on at the moment is so that we can actually bake some lighting.
So now that we've made all of these static lights.
Now to another profile.
So just like the soap press play again, and it should start right from the beginning.
You go and press pause.
All right, so he stopped.
So now if I click anywhere and I click rendering, we've now got full draw calls.
OK, so massive saving static button is now patched recalls of 24.
So many items we had before.
Now patch them all up.
And it's only sending four commands from the CPU to the GPU.
So that's going to instantly make your frames per second so much better and it's going to be so much
faster.
OK.
Notice also triangles are only one point eight thousand vertices, two point nine thousand.
They haven't changed.
OK.
Use textures is exactly the same.
Render textures is exactly the same.
All right.
So it doesn't do anything there.
It basically just speeds up the process between the CPU and the GP, a CPU.
You'll notice that rendering looks like it's got a lot bigger.
But as soon as I put all this on or without actually the rendering, I got a lot bigger.
And that's probably because it's all botched.
OK.
Oh, actually, no, it doesn't look, as soon as I switch off of this, it's gone right back down to
where it was originally.
All right.
It was basically just zoomed in because I had the others switched off.
OK, so no change to the rendering on the CPU?
Massive change to the draw calls.
So that is really, really key tip for when working with mobiles.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.