Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:03,360 --> 00:00:06,510
So in this video, we're now going to take a look at the profiler.
2
00:00:06,780 --> 00:00:12,060
Profiler is really useful when you wanting to debug a game and you want to know more about what's going
3
00:00:12,060 --> 00:00:14,070
on behind the scenes.
4
00:00:14,400 --> 00:00:16,080
And now the actual game is running.
5
00:00:16,440 --> 00:00:23,580
OK, you can find the profiler on the window sequencing analysis, rather, and profiler.
6
00:00:23,910 --> 00:00:26,560
OK, now you've got a profiler or a profiler standalone.
7
00:00:26,580 --> 00:00:28,530
I'd recommend using the profiler at the moment.
8
00:00:29,130 --> 00:00:34,110
And if this comes up like this now, it does look a little bit intimidating to begin with.
9
00:00:34,980 --> 00:00:41,820
What I'm going to do, I'm actually going to duck this down here and I bring this up like this.
10
00:00:45,610 --> 00:00:48,130
Bring this down so I can see more of what's going on.
11
00:00:48,580 --> 00:00:50,650
By default, it should be ready to record.
12
00:00:51,010 --> 00:00:58,570
OK, if that's not highlighted, just make sure you press that and to maybe the audio, but don't maximize
13
00:00:58,570 --> 00:00:59,470
on play at the moment.
14
00:00:59,830 --> 00:01:01,480
And I'm just going to press play.
15
00:01:01,900 --> 00:01:04,660
OK, then you'll start to see all sorts of business going on here.
16
00:01:05,350 --> 00:01:06,240
OK, here we go.
17
00:01:06,250 --> 00:01:10,480
It's starting to show me exactly what's going on in terms of every frame.
18
00:01:10,960 --> 00:01:16,510
So as soon as I press pause, OK, allows me then to analyze exactly what's going on.
19
00:01:17,110 --> 00:01:21,600
So if you take a look at the timeline at the bottom, this is actually showing me my main thread in
20
00:01:21,610 --> 00:01:28,870
my runda thread, showing me what the actual processes are and what's happening with any one of these.
21
00:01:28,870 --> 00:01:31,900
You can just click on these in order to get a little bit more detail.
22
00:01:32,590 --> 00:01:32,980
All right.
23
00:01:34,420 --> 00:01:37,340
And we'll come to a lot of these later.
24
00:01:37,390 --> 00:01:39,100
Different jobs that's doing.
25
00:01:39,100 --> 00:01:45,880
You can review these how long they're taking in terms of milliseconds, etc. So there's all sorts of
26
00:01:45,880 --> 00:01:47,170
things going on there.
27
00:01:47,590 --> 00:01:52,720
But what I want to focus on at the moment is the draw calls.
28
00:01:53,050 --> 00:01:55,150
OK, so that'll actually be part of my rendering.
29
00:01:55,780 --> 00:01:59,140
So if I click on rendering, it's actually going to show me now.
30
00:01:59,890 --> 00:02:02,500
And he's actually saying draw calls zero.
31
00:02:02,740 --> 00:02:05,620
That's interesting saying that.
32
00:02:06,990 --> 00:02:07,380
Um.
33
00:02:10,520 --> 00:02:14,120
To make sure that we go, that's better.
34
00:02:14,180 --> 00:02:14,600
All right.
35
00:02:14,810 --> 00:02:18,140
I don't think I was I had not been selected on the screen.
36
00:02:18,230 --> 00:02:19,490
So you do have to select something.
37
00:02:19,820 --> 00:02:22,100
So the moment I got 25, Dracul.
38
00:02:22,760 --> 00:02:26,900
So a lot of these objects are now being basically separated and to draw close.
39
00:02:27,380 --> 00:02:33,800
And where we say static batching batched locals were on zero, but means that it takes a bunch of objects
40
00:02:33,800 --> 00:02:38,600
and sticks them all together in one group and it saves draw cork's.
41
00:02:39,020 --> 00:02:39,410
OK.
42
00:02:39,770 --> 00:02:46,580
And it's rendering the total of one point 8000 triangles, two point 9000 vertices.
43
00:02:46,850 --> 00:02:48,640
That's what's in our scene set.
44
00:02:48,740 --> 00:02:49,880
Pascals is three.
45
00:02:49,910 --> 00:02:52,190
So in the words, how many separate elements are there?
46
00:02:52,190 --> 00:02:53,170
There's the ground.
47
00:02:53,180 --> 00:02:55,700
There's these there's the trees.
48
00:02:56,090 --> 00:02:56,440
OK.
49
00:02:57,110 --> 00:03:03,840
What that means is basically any item with a separate material since all these items of an.
50
00:03:04,890 --> 00:03:08,220
The same material because it's texture.
51
00:03:09,060 --> 00:03:15,150
They all come under one set, Pascall the trees are using the different material and the ground is using
52
00:03:15,150 --> 00:03:15,990
the different material.
53
00:03:16,970 --> 00:03:18,030
Can't use textures.
54
00:03:18,030 --> 00:03:23,100
We're only have three taking up a total of one hundred and six point eight megabytes in memory, or
55
00:03:23,100 --> 00:03:26,340
at least video ram render textures at the moment.
56
00:03:26,670 --> 00:03:29,160
Just six, up to 34 megabytes.
57
00:03:29,310 --> 00:03:39,270
OK, as it gives you loads of great information, it also displays is a visual guide as to what's happening
58
00:03:39,270 --> 00:03:40,560
in terms of your rendering.
59
00:03:40,830 --> 00:03:44,060
So you can see exactly how many milliseconds it's taken to render.
60
00:03:45,610 --> 00:03:51,830
What we can also see under our CPU is the time in which rendering is plain scripts.
61
00:03:51,850 --> 00:03:58,450
There aren't any scripts at the moment and physics animations, garbage collection, V Sync switch,
62
00:03:58,450 --> 00:04:02,980
v sync after that should be zero global illumination, UI and all this.
63
00:04:03,010 --> 00:04:07,000
So most of it at the moment is taken up with others and rendering.
64
00:04:07,750 --> 00:04:09,910
So you can actually switch some of these off.
65
00:04:10,310 --> 00:04:13,570
So, for example, I switch all of these off.
66
00:04:14,380 --> 00:04:15,970
So I'm just left with rendering and others.
67
00:04:15,970 --> 00:04:17,410
And you can see there was no change.
68
00:04:17,710 --> 00:04:20,500
So all of those with nothing for switch of the off.
69
00:04:21,040 --> 00:04:22,720
This is what's left in our rendering.
70
00:04:23,530 --> 00:04:25,470
Now, the others, I'm not entirely sure.
71
00:04:25,600 --> 00:04:26,830
Covid in this.
72
00:04:28,930 --> 00:04:32,380
Well, rendering is is our main concern at the moment.
73
00:04:32,770 --> 00:04:35,890
And so we can see this relatively low.
74
00:04:36,280 --> 00:04:43,870
You can actually use your slide or at the bottom to move out, and it's got these little caps on the
75
00:04:43,870 --> 00:04:44,050
end.
76
00:04:44,050 --> 00:04:52,210
So you can actually bring these and just make sure you're actually clicked on the item that you want
77
00:04:52,210 --> 00:04:52,780
to see.
78
00:04:55,090 --> 00:04:56,440
It only gives us that.
79
00:04:56,860 --> 00:04:58,600
That was when I actually started.
80
00:04:58,600 --> 00:04:59,770
That's when we pulled it.
81
00:04:59,770 --> 00:05:01,720
So there's no other elements to see the.
82
00:05:04,370 --> 00:05:04,760
OK.
83
00:05:05,360 --> 00:05:10,520
You also have memory as well, if I can see a spike in memory happening right there.
84
00:05:10,940 --> 00:05:15,860
Some things happened at that particular point in time, so you might want to memory and find out exactly
85
00:05:15,860 --> 00:05:16,730
what's going on there.
86
00:05:17,510 --> 00:05:21,620
And we get our different audio.
87
00:05:22,790 --> 00:05:27,770
For some reason, we've got some sort of audio going on, any kind of video devices.
88
00:05:27,770 --> 00:05:31,070
We've got no video rendering, any kind of physics elements.
89
00:05:31,760 --> 00:05:34,820
We've got no physics in there at the moment other than the box collider.
90
00:05:35,540 --> 00:05:39,260
Physics to the network in messages, if you're doing anything online.
91
00:05:39,710 --> 00:05:45,980
Network operations, once again, if it's online, UI is a user interface, any kind of 2D graphics
92
00:05:45,980 --> 00:05:46,940
that are on the screen.
93
00:05:47,180 --> 00:05:53,270
We don't really have any of that at the moment, even though we're getting these very, very tiny spikes
94
00:05:54,440 --> 00:05:56,450
and then global illumination.
95
00:05:56,480 --> 00:05:56,900
Wow.
96
00:05:57,200 --> 00:06:05,270
This is basically all of the lighting since we actually have a directional light in there at the moment.
97
00:06:05,280 --> 00:06:09,080
Presumably most of this is coming from the way it's interacting with these objects.
98
00:06:09,860 --> 00:06:11,210
And then virtual texturing.
99
00:06:12,140 --> 00:06:12,500
OK.
100
00:06:12,800 --> 00:06:17,750
So as part of our rendering, then we've got a drawer full of 25.
101
00:06:17,990 --> 00:06:18,800
Let's remember that.
102
00:06:21,320 --> 00:06:21,760
I know.
103
00:06:21,760 --> 00:06:23,090
Want to do switch this off.
104
00:06:23,810 --> 00:06:26,910
I want to take all of these blue elements.
105
00:06:27,000 --> 00:06:31,700
Just hold shift and click on this one and the want to drag them onto ground.
106
00:06:32,000 --> 00:06:33,830
So I'm going to parent them to the ground.
107
00:06:34,560 --> 00:06:36,620
The same with all these just shift.
108
00:06:37,070 --> 00:06:39,050
Let's drag them all onto the ground.
109
00:06:39,620 --> 00:06:39,950
OK.
110
00:06:40,430 --> 00:06:44,630
In this way, we can then close down the ground and thus all of these items parented.
111
00:06:45,200 --> 00:06:46,860
So now click on ground.
112
00:06:47,480 --> 00:06:53,600
And I can now choose static basically means that these objects will not move.
113
00:06:54,110 --> 00:06:55,880
I'm going to say you change the children.
114
00:06:56,240 --> 00:06:58,180
That changes all of the subelements.
115
00:06:58,190 --> 00:06:59,150
That's all of those.
116
00:06:59,810 --> 00:07:06,680
OK, and what it's done is basically to take to all of these items on all these items are basically
117
00:07:06,680 --> 00:07:09,350
meant to optimize the performance.
118
00:07:09,830 --> 00:07:16,010
If an object doesn't move, always market is static, OK, because otherwise unity is going to pay special
119
00:07:16,010 --> 00:07:20,330
attention to the object, thinking it's going to change position from frame to frame.
120
00:07:20,750 --> 00:07:21,500
And it never will.
121
00:07:22,100 --> 00:07:27,140
If it's static, it knows it's always going to be in place, then it can do its optimization stuff.
122
00:07:29,180 --> 00:07:34,190
So wherever we've got these animators who probably have it on, all of them, some signal shift.
123
00:07:35,420 --> 00:07:35,810
OK.
124
00:07:35,840 --> 00:07:43,520
When you get something like that, it basically means you can't select multiple different types, just
125
00:07:43,520 --> 00:07:44,750
all these mobile tombs.
126
00:07:44,750 --> 00:07:47,810
And you can right click on the animation, choose remove component.
127
00:07:49,700 --> 00:07:53,200
Same with all of these just right click remove component.
128
00:07:53,210 --> 00:08:02,450
Don't need any animations, trees, right click remove component and the first tree right click remove
129
00:08:02,450 --> 00:08:03,230
component.
130
00:08:07,790 --> 00:08:08,870
Mobile on alert.
131
00:08:08,960 --> 00:08:10,160
All right, that's great.
132
00:08:10,590 --> 00:08:16,880
Now, on all of these items at the moment, we're going to leave the cash to those who receive shadow
133
00:08:16,880 --> 00:08:17,150
zone.
134
00:08:17,720 --> 00:08:19,280
Later, we're going to switch those off.
135
00:08:19,670 --> 00:08:20,000
All right.
136
00:08:20,010 --> 00:08:24,740
The reason why we're leaving them on at the moment is so that we can actually bake some lighting.
137
00:08:24,740 --> 00:08:29,100
So now that we've made all of these static lights.
138
00:08:29,120 --> 00:08:30,950
Now to another profile.
139
00:08:31,730 --> 00:08:37,880
So just like the soap press play again, and it should start right from the beginning.
140
00:08:40,710 --> 00:08:44,250
You go and press pause.
141
00:08:45,210 --> 00:08:46,320
All right, so he stopped.
142
00:08:46,710 --> 00:08:54,150
So now if I click anywhere and I click rendering, we've now got full draw calls.
143
00:08:54,450 --> 00:09:00,540
OK, so massive saving static button is now patched recalls of 24.
144
00:09:00,990 --> 00:09:02,430
So many items we had before.
145
00:09:02,850 --> 00:09:04,300
Now patch them all up.
146
00:09:04,320 --> 00:09:08,580
And it's only sending four commands from the CPU to the GPU.
147
00:09:08,790 --> 00:09:14,850
So that's going to instantly make your frames per second so much better and it's going to be so much
148
00:09:14,850 --> 00:09:15,330
faster.
149
00:09:16,320 --> 00:09:16,670
OK.
150
00:09:16,710 --> 00:09:21,540
Notice also triangles are only one point eight thousand vertices, two point nine thousand.
151
00:09:21,840 --> 00:09:22,830
They haven't changed.
152
00:09:23,010 --> 00:09:23,490
OK.
153
00:09:24,270 --> 00:09:26,280
Use textures is exactly the same.
154
00:09:26,280 --> 00:09:28,110
Render textures is exactly the same.
155
00:09:28,440 --> 00:09:28,740
All right.
156
00:09:28,740 --> 00:09:30,150
So it doesn't do anything there.
157
00:09:30,480 --> 00:09:37,800
It basically just speeds up the process between the CPU and the GP, a CPU.
158
00:09:37,950 --> 00:09:42,250
You'll notice that rendering looks like it's got a lot bigger.
159
00:09:42,570 --> 00:09:48,300
But as soon as I put all this on or without actually the rendering, I got a lot bigger.
160
00:09:48,630 --> 00:09:50,970
And that's probably because it's all botched.
161
00:09:51,420 --> 00:09:51,840
OK.
162
00:09:55,640 --> 00:10:00,650
Oh, actually, no, it doesn't look, as soon as I switch off of this, it's gone right back down to
163
00:10:00,650 --> 00:10:01,730
where it was originally.
164
00:10:02,120 --> 00:10:02,410
All right.
165
00:10:02,420 --> 00:10:06,230
It was basically just zoomed in because I had the others switched off.
166
00:10:06,890 --> 00:10:11,240
OK, so no change to the rendering on the CPU?
167
00:10:11,300 --> 00:10:13,430
Massive change to the draw calls.
168
00:10:13,670 --> 00:10:17,780
So that is really, really key tip for when working with mobiles.
14974
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.