Skip to content

Commit a238d45

Browse files
authored
Merge pull request #2740 from pareenaverma/content_review
Removed uppercase image name duplicates for Unity LPs
2 parents e5abf31 + 4a28f4c commit a238d45

25 files changed

Lines changed: 14 additions & 14 deletions

content/learning-paths/mobile-graphics-and-gaming/profiling-unity-apps-on-android/2-preparation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Once Unity has loaded, you will be presented with a template project. You can ig
7171

7272
13. The Import Unity Package window will appear. It allows individual files and folders to be imported or ignored. You will need all of the files in the project. Leave all items ticked and select _Next_.
7373

74-
![Import sample project#center](images/import-window-step-1.PNG "Figure 3. Import the sample project using the Package Manager.")
74+
![Import sample project#center](images/import-window-step-1.png "Figure 3. Import the sample project using the Package Manager.")
7575

7676
14. A second window will open listing the project settings that will be overwritten. You want the settings from the sample project, so leave all items ticked and select _Import_.
7777

@@ -86,15 +86,15 @@ Once the sample project has been imported, you will see some errors and warnings
8686

8787
3. Select _Switch Platform_, as you did in the [previous Learning Path](/learning-paths/mobile-graphics-and-gaming/get-started-with-unity-on-android/3-test-on-android/)
8888

89-
![Build-Profile-Menu#center](images/BP-menu.png "Figure 5. Build Profile menu.")
89+
![Build-Profile-Menu#center](images/bp-menu.png "Figure 5. Build Profile menu.")
9090

9191
Unity will take a moment to build the assets for the Android platform.
9292

9393
The errors will disappear, but some warnings regarding unreachable code may appear. These will be explained later and can be safely ignored for now.
9494

9595
Your Scene view should look something like this:
9696

97-
![Scene view#center](images/sample-project-default-scene-view.PNG "Figure 6. Default scene view of the sample project.")
97+
![Scene view#center](images/sample-project-default-scene-view.png "Figure 6. Default scene view of the sample project.")
9898

9999
If it does not, the next steps should help identify the issue.
100100

@@ -117,7 +117,7 @@ It is worth checking that everything has been imported and built correctly.
117117

118118
The game will launch, and you will see an empty environment begin to fill with more and more characters (capsules) over time. It will look something like this:
119119

120-
![Screenshot at runtime#center](images/game-view.PNG "Figure 8. Sample running in Game view.")
120+
![Screenshot at runtime#center](images/game-view.png "Figure 8. Sample running in Game view.")
121121

122122
## Deploy to Android
123123
You will now deploy the sample to your Android device. Your device must already be set up for development. For detailed instructions, read the learning path [Get started with Unity on Android](/learning-paths/mobile-graphics-and-gaming/get-started-with-unity-on-android).

content/learning-paths/mobile-graphics-and-gaming/profiling-unity-apps-on-android/4-profiling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The Profiler window contains a lot of information spread over two main scrollabl
7171
### CPU Usage graph and frame-rate labels
7272
The CPU Usage graph captures profiling data every frame while it is active.
7373

74-
![Profiler CPU usage#center](images/profiler-samsung-s8-plain.PNG "Figure 2. The CPU Usage graph with data from the sample collision code app collected.")
74+
![Profiler CPU usage#center](images/profiler-samsung-s8-plain.png "Figure 2. The CPU Usage graph with data from the sample collision code app collected.")
7575

7676
If you have a performance issue that worsens over time (as with the case of the collision sample), you will see the graph gradually (or quickly) fill over time. Watch the frame rate labels on the left of the graph. These labels mark the Y-axis at set intervals. They show you what CPU Usage would be required to achieve given frame rates. For example, if your CPU Usage remained under 16 milliseconds then as far as the CPU is concerned, a frame rate of 60 frames-per-second (FPS) would be achievable. If the CPU Usage is under 16ms but your frame rate is still lower than expected, that is an indication that the app has performance issues elsewhere, e.g., in the GPU.
7777

@@ -83,7 +83,7 @@ The CPU Usage graph provides a very high level view of what is happening in the
8383

8484
The peaks on the CPU Usage graph tell you where there are particularly high loads. Ensure that the drop-down menu in the lower panel is showing Timeline. Select a frame on your graph where there is a peak or any frame that looks as if it took more time than it should (in this case, all frames look suitable).
8585

86-
![Profiler selected frame#center](images/profiler-analyse-selected-frame.PNG "Figure 3. Profiler highlighting selected frame.")
86+
![Profiler selected frame#center](images/profiler-analyse-selected-frame.png "Figure 3. Profiler highlighting selected frame.")
8787

8888
The lower panel will show activity from the selected frame. The rows show main thread, render thread, job worker threads (expand Job entry to see the workers and what tasks they performed) and several other areas and job types. The colors of the boxes match those of the categories listed in the CPU Usage panel.
8989

@@ -99,7 +99,7 @@ The PlayerLoop entry on the main thread is an internal Unity engine function, th
9999

100100
Staying in the lower panel, select the drop-down menu currently labeled Timeline. Change it to Hierarchy mode. You will now see a Hierarchy of functions and profiled areas. Expand the Hierarchy to show *PlayerLoop/Update.ScriptRunBehaviourUpdate/BehaviourUpdate*.
101101

102-
![Profiler hierarchy view#center](images/profiler-analyse-selected-frame-hierarchy.PNG "Figure 4. Hierarchy view of selected frame.")
102+
![Profiler hierarchy view#center](images/profiler-analyse-selected-frame-hierarchy.png "Figure 4. Hierarchy view of selected frame.")
103103

104104
Under BehaviourUpdate, you will see the custom script `CollisionCalculationScript.Update`. If you look across to the right, you will see information about the calls to this function. Under the Total column below you will see that the `CollisionCalculationScript Update()` function took 66.4% of the total of PlayerLoop. Expand `CollisionCalculationScript` to drill down even further.
105105

@@ -113,7 +113,7 @@ The Deep Profile option tells the Profiler to collect much more performance data
113113

114114
In addition to performance timings, you can also see how often memory allocations are made. The Call Stacks option enables recording of such memory allocations. It is accompanied by a pull-down menu with three options, _GC.Alloc_ is the default. You can see when your code triggers a memory allocation. Click on the GC.Alloc block (in magenta) to see the call stack in the pop-up window.
115115

116-
![Call Stacks#center](images/profiler-analyse-selected-frame-call-stacks-enabled.PNG "Figure 5. Call stack leading to a memory allocation using GC.Alloc mode of Call Stacks option.")
116+
![Call Stacks#center](images/profiler-analyse-selected-frame-call-stacks-enabled.png "Figure 5. Call stack leading to a memory allocation using GC.Alloc mode of Call Stacks option.")
117117

118118
### Mark your own code for profiling
119119

content/learning-paths/mobile-graphics-and-gaming/profiling-unity-apps-on-android/6-unity-analyzer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For now, open the Analyzer you have just installed:
4141

4242
The Analyzer will now import the unoptimized recording and you will see several panels summarizing the data:
4343

44-
![Analyzer panels#center](images/analyzer-panels-after-pull-data.PNG "Figure 2. Profiler Analyzer panels; Mode and Export (top left), activity graph (top), filters (middle left), profile markers (bottom) and summaries (right).")
44+
![Analyzer panels#center](images/analyzer-panels-after-pull-data.png "Figure 2. Profiler Analyzer panels; Mode and Export (top left), activity graph (top), filters (middle left), profile markers (bottom) and summaries (right).")
4545

4646
- The Mode can be switched between _Single_ (view a single data set) and _Compare_ (compare two frames from the same or different data sets)
4747

@@ -93,7 +93,7 @@ You can also reduce the data analysis to a specific range of frames.
9393

9494
6. Hover your mouse over the selected frames in the graph to see a pop-up summary. The pop-up will tell you the frame duration of the exact frame you are hovering over and also the total time of the selected frames.
9595

96-
![Analyzer frame selection#center](images/analyzer-select-similar-frames.PNG "Figure 3. Selected range of similar frames from the unoptimized version.")
96+
![Analyzer frame selection#center](images/analyzer-select-similar-frames.png "Figure 3. Selected range of similar frames from the unoptimized version.")
9797

9898
You can see from the Marker Details table, the function _CollisionCalculationScript.Update_ is high in the list.
9999

@@ -115,7 +115,7 @@ The collision sample is unlikely to be GPU bound but here's how to tell using th
115115

116116
- In the case of the collision sample, the median is zero. Under _Marker Summary_ you can see the min and max values are also both zero. The sample never seems to be waiting for the GPU.
117117

118-
![Check if GPU-bound#center](images/analyzer-check-gpu-bound.PNG "Figure 4. Check if the CPU is waiting (Gfx.WaitForPresent) for the GPU.")
118+
![Check if GPU-bound#center](images/analyzer-check-gpu-bound.png "Figure 4. Check if the CPU is waiting (Gfx.WaitForPresent) for the GPU.")
119119

120120
### Performance data for specific functions or markers
121121

@@ -127,7 +127,7 @@ Select multiple frames again by left-clicking and dragging on the graph.
127127

128128
You have seen already that the collision detection script is taking a significant amount of the total frame time. In the Name Filter enter “collision” to reduce the Marker Details table.
129129

130-
![Use name filter#center](images/analyzer-filter-text-collision.PNG "Figure 5. Use the Name Filter to search for collision.")
130+
![Use name filter#center](images/analyzer-filter-text-collision.png "Figure 5. Use the Name Filter to search for collision.")
131131

132132
You can now see data for functions and markers with “collision” in their name.
133133

@@ -173,7 +173,7 @@ Keep the unoptimized data in the Analyzer. Leave the Name Filter set to “colli
173173

174174
You are now looking at the unoptimized (upper graph) and optimized (lower graph) data.
175175

176-
![Pulled datasets#center](images/analyzer-pulled-datasets.PNG "Figure 6. Comparing two datasets.")
176+
![Pulled datasets#center](images/analyzer-pulled-datasets.png "Figure 6. Comparing two datasets.")
177177

178178
### Graph selection
179179
Each graph can have a range of frames selected. If you want to ensure that you select the same frames from both graphs, tick the option _Pair Graph Selection_. Do this now. When you click on a specific frame in either graph, the same frame will be selected in the other graph automatically.
@@ -185,7 +185,7 @@ You are now comparing the first 300 frames of each data set.
185185
### Comparing the two data sets
186186
You will notice immediately a difference in the _Top 10 markers on median frames_ area. You can see the difference between the two median frames in the screenshot below. The upper frame duration is 87.7ms while the lower frame is 33.4ms (these numbers are to the right of the colored entries). The size of each marker/function for the optimized set are all reduced compared to the unoptimized version. This is as expected since the optimizations will have reduced how long each of those operations takes.
187187

188-
![Data comparison#center](images/analyzer-dataset-comparison.PNG "Figure 7. Comparing performance data pre- and post-optimization.")
188+
![Data comparison#center](images/analyzer-dataset-comparison.png "Figure 7. Comparing performance data pre- and post-optimization.")
189189

190190
In the Marker Details table (now labeled Marker Comparison) you will see that there are new columns. Left Median, Right Median and two columns marked "<" and ">". The "left" dataset is the unoptimized code, the right is the optimized code. The Diff and Abs Diff columns give you the numerical difference (and absolute difference) between each function/marker.
191191

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)