SlideShare a Scribd company logo
1
Unity Forum
27.04.2017
2
Content
Day Time slot Topic Presenter
27.04.2017
15:00 - 15:10 Picks round All
15:10 - 15:45 Mobile performance improvement techniques adopted in Catan Rubén Torres Bonet
25.05.2017
Draft
15:00 - 15:15 Picks round
15:15 - 15:45 Who wants more spaghetti code?
Unity Dependency Injection with Zenject
Rubén Torres Bonet
Open topic Assignee Open topic Assignee
Plugin management in Unity The rendering pipeline
UniRx Navmeshes
Karma for Unity
33
Performance
techniques in Catan
Rubén Torres Bonet
4
Contents
1. Objectives
2. Starting point
3. Tooling: analyzing the gap
4. Memory management
5. Materials
6. Textures
7. Shaders
8. Audio
9. Camera imposter system
10. Power consumption
11. Conclusions
5
1. Objectives
1. Reduce startup time: < 30 s
2. Reduce loading times: scenes, instantiating
3. Smooth framerate: > 30 fps
4. No framerate spikes
5. Reduce power consumption
Reference devices:
- iOS: iPhone 5/5s
- Android: Samsung S4
6
2. Starting point
- On-going development version of Catan running on PC and WebGL
- Gather hardware/software specs about devices:
- CPU: brand, features, cores, frequency, cache size
- GPU: frequency, cache levels, stream processors, fill-rate, OpenGL ES version (>= 3.0)
- RAM: texture, audio, mesh sizes
- Minimum OS version: native plugins
- OpenGL ES Hardware DB
- Unity Mobile Hardware Stats
- GSMArena
- Wikipedia Adreno specs
- Catan scenes:
- Launch time: 45s
- Main menu: 1 FPS
- In-game: 12 FPS
7
3. Analysis
Tools sorted by my personal taste:
1. Unity Stats window: “FPS”, draw calls, triangles, batches
2. RenderDoc: GPU profiling/debugging
3. Unity Profiler: CPU profiling; also good for memory analysis
4. Frame Debugger
5. Snapdragon profiler, Adreno profiler: low-level metrics
6. Hdg Remote Debug: A/B performance analysis
7. Debug.Log
8. XCode profiler
8
3. RenderDoc
Awesome:
- Draw calls cost
- Draw call debugger
- Rendering pipeline examiner
- Texture crawler (aka. stealer)
- Mesh examination
- Fragment debugging
- Shader debugging
- ...
Check my (old) presentation about it
9
3. Snapdragon prof.
For Snapdragon chipsets
10
3. Hdg remote debug
- Unity plugin
- Real-time examining and modifying of the Unity hierarchy
- Target: an app running in a device (iOS, Android…)
- Simple A/B testing for analysing performance issues:
- Import plugin
- Insert prefab
- Open the remote hierarchy window
- Introduce IP of the target device running your app
- Examine hierarchy manually using binary search
- Turn on/off individual GameObjects and components to check performance impact
- Quick way of isolating bottlenecks
- Use other tools to find the issue within the chosen GameObject/MonoBehaviour
https://www.assetstore.unity3d.com/en/#!/content/61863
11
4. Memory management
- Workflow:
- You allocate some memory blocks too often
- Unity triggers the (in)famous garbage collector, which it is itself garbage
- All threads are blocked for a long period of time (between 50ms and 1s in mobile?)
- Users are angry, dev gets fired
- Main problem: most allocations are implicit and evil. There’s no new
keyword involved, the dev doesn’t know about it till it’s too late
- Typical issues:
- Boxing: myNonGenericArrayList.Add(5);
- LINQ, foreach
- Dynamic instantiation of objects: use object pooling
- Coroutines: starting & creation of yield operations (please cache them and use return null
instead of 0 or boxing occurs)
- When not caching lists but rather recreating them
- Use the stack when possible instead of the heap
12
5. Materials
- Unity offers no per-platform material system
- Materials can be pretty expensive because of the shaders and textures
- Solution? No solution, just workarounds
- I created a build step that replaces material references in compile-time to their
_desktop.mat and _mobile.mat counterparts
- Don’t use standard shaders in mobile
- Workflow:
- After the builds are completed, please check what was included in it using BuildReport
- An item (material, shaders, textures, audio...) you don’t like was included? Check its references with FindReferences2
- Use A+ Asset Explorer to quickly tweak texture settings (size, compression..:) and many other issues
- Create platform-specific shaders when expensive
13
6. Textures
- Texture compression: of uttermost importance on mobile:
- Each texture fetch in fragment shaders will ask texture samplers for texels
- The texture block cache access is likely to miss if you have lots of big textures, therefore producing a stall
- It reduces startup and loading times, since textures are stored compressed both in permanent storage and RAM
- It will also reduce the distributed package size (APK/IPA..)
- If the format is not supported in the current architecture, it’ll be CPU-recompressed by Unity (longer loading times)
- It can, however, produce artifacts and you have to consider the platform capabilities
- Tweak texture size to your needs (screen size of the projected textures)
- Advanced texture filtering (>= trilinear) is still expensive in mobile
- Disable mipmapping when not needed (e.g. screen space UI)
- Check that expensive textures maps are not included in the mobile build: heightmaps,
detail maps, etc.
14
7. Shaders
- Prefer lower precision variables in this order: fixed, half, float
- Avoid standard shaders; go instead for Lambert or Phong lighting models
- Do not have more than one light source. Mobile platforms support only forward
rendering so that every light creates a new rendering pass
- Do not use GrabPass (and therefore avoid post-effects), as they quickly stall the
rendering pipeline and will quickly reach your fill-rate and bandwidth capabilities
- Disable fog if not needed
- Avoid mega-shaders and big shaders; compile times will be annoying (e.g. 10 s)
- Fake lighting effects with unlit shaders with custom parameters
- Disable shadow support if possible
- Avoid alpha blending, as it breaks mobile GPU tiling optimizations and produces more
overdraw
- Consider introducing a z-prepass step in case of high overdraw and expensive
fragment operations
15
8. Audio
Check Unity profiler for memory usage first
General recommendations:
- If they are taking too much memory (> 30mb), find AudioClips that are rarely played
and set them to streaming
- If they are increasing loading times:
- Set them to load in background (can get out of sync though)
- Disable preload, but you might get a framerate spike the first time they use it
- Set them to streaming, but that will cause CPU overhead
Play with compression methods
16
9. Camera imposter system
- We want the desktop quality in mobile
- We know we can’t achieve it. But, can we fake it?
- Let’s take the background objects and make a static screenshot of them. We can put
that screenshot as a background picture in our scene
- Wait, that doesn’t work quite well:
- Depth information is lost
- Editing workflow is slow (taking screenshots, positioning them, deploying)
- Screenshots are resolution-dependent; we target heterogeneous devices and filtering would ruin its quality
- My approach:
- We render them in run-time with maximum quality at the beginning of the scene:
- A first time to grab the color buffer
- A second and last time to grab the depth buffer
- We disable the original objects
- We keep both textures in a RenderTexture
- We draw both textures at the beginning of each frame with special shaders that output color and writes to the zbuffer
17
- It looks easy, doesn’t it? It is not
- There are many limitations imposed by Unity and OpenGL ES
- Still, I managed to render the whole background of the main menu scene of Catan with
all post-effects: sheep, terrain, environment, trees
- Advantages:
- Huge quality in mobile comparable to desktop
- High frame-rate
- Flexible and fast workflow
- Disadvantages:
- The objects can only be static (although you can re-render manually at any time)
- It is low-level and feels hacky. Unlikely, but it might break with future Unity releases and I’ll probably not be here to fix it
- It doesn’t work on older phones, since shader depth-writing requires OpenGL ES > 3.0
- It requires compiling the post-effect shaders and the original meshes and textures still (obviously)
9. Camera imposter system
18
- Sources of power consumption:
- CPU:
- Intense calculations dissipate a lot of heat (power)
- Requiring data that was used a long time ago breaks temporal locality -> cache miss -> bandwidth requirement
- Asking for data that is distant from each other breaks spatial locality -> cache miss -> bandwidth requirement
- Induce device wakelock by performing background operations when the screen is off
- High frame-rate. Consider reducing it in some scenes (in highly static scenes 10FPS might be enough)
- GPU:
- Shader calculations eats most of it, especially if redundant (overdraw)
- Large amount of objects taking a big screen area excessively loads the rasterizer, produces overdraw if not well
sorted (e.g. transparency) and overloads shader processing units.
- GrabPass and post-effects eat bandwidth like a boss
- Screen:
- Darker colors usually consume less energy
- Other:
- GPS is power-hungry slow communication channel that prevents wakelock, avoid tracking users
- Making your game too addictive will also lead users to wasting lots of battery on it ;)
- Micro-optimization: set clear flag to pure black
10. Power consumption
19
Conclusions
To “unoptimize” your mobile game:
- Don’t consider performance relevant from the beginning
- Put post-effects everywhere. If possible, in multiple full-screen cameras.
- Keep myriad of useless big textures in memory
- Use complex mega-shaders with multiple light sources
- Avoid static batching by forgetting to marking static flags
- Break dynamic batching by applying non-uniform negative scaling
- Reference unneeded materials because you can
- Do intense alpha blending to break GPU tiling optimizations and create more overdraw
- Do not cache coroutine yield instructions
- Ignore the Pareto Principle
20
Conclusions
To “unoptimize” your mobile game:
- Use real-time reflection probes
- Use LINQ and start coroutines in a per-frame basis
- Using unsupported texture compression formats and disable mipmapping
- Don’t bother to make atlases, even though it only takes a few clicks to enable it
- Include uncompressed unoptimized audio even if you target deaf audience
- Use GameObject.FindObjectsOfType and GameObject.Find
- Use the hardware specs sheet as a beer/coffee coasters
- Leave imported mesh colliders there
- Use the new keyword on classes as often as your keyboards lets you type it
- Be lazy enough to skip checking the contents of the final build
21
Conclusions
And lastly, to “unoptimize” your mobile game...
- Don’t communicate with colleagues when you are unsure about the performance
impact of your changes
We all are here to learn and improve (and some to gain money I’ve heard)
22
2323
Questions
2424
Thanks!

More Related Content

PDF
Optimizing Large Scenes in Unity
PPTX
Unity - Internals: memory and performance
PDF
Unite 2013 optimizing unity games for mobile platforms
PDF
Mobile crossplatformchallenges siggraph
PPTX
Practical guide to optimization in Unity
PDF
Enlightenment Foundation Libraries (Overview)
PPT
Cse191 01
PDF
Improving MeeGo boot-up time
Optimizing Large Scenes in Unity
Unity - Internals: memory and performance
Unite 2013 optimizing unity games for mobile platforms
Mobile crossplatformchallenges siggraph
Practical guide to optimization in Unity
Enlightenment Foundation Libraries (Overview)
Cse191 01
Improving MeeGo boot-up time

Similar to Unity optimization techniques applied in Catan Universe (20)

PPTX
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
PPTX
Unity best practices (2013)
PPTX
Practical Guide for Optimizing Unity on Mobiles
PPTX
Tales from the Optimization Trenches - Unite Copenhagen 2019
PPTX
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
PPTX
Optimizing mobile applications - Ian Dundore, Mark Harkness
PPTX
[TGDF 2020] Mobile Graphics Best Practices for Artist
PDF
Korea linuxforum2014 html5game-sangseoklim
PPTX
Optimizing unity games (Google IO 2014)
PPTX
Advanced Mobile Optimizations
PPTX
[Unity Forum 2019] Mobile Graphics Optimization Guides
PDF
Unity: Introduction
PDF
Basic Optimization and Unity Tips & Tricks by Yogie Aditya
PPTX
Mobile optimization techniques
PDF
Unite2013-gavilan-pdf
PPT
Advanced Mobile Optimizations.ppt
PDF
Mobile Performance Tuning: Poor Man's Tips And Tricks
ZIP
Unite2012 Click and Gun - Lighting workflow
PPTX
Creating great Unity games for Windows 10 - Part 2
[Unite Seoul 2020] Mobile Graphics Best Practices for Artists
Unity best practices (2013)
Practical Guide for Optimizing Unity on Mobiles
Tales from the Optimization Trenches - Unite Copenhagen 2019
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Optimizing mobile applications - Ian Dundore, Mark Harkness
[TGDF 2020] Mobile Graphics Best Practices for Artist
Korea linuxforum2014 html5game-sangseoklim
Optimizing unity games (Google IO 2014)
Advanced Mobile Optimizations
[Unity Forum 2019] Mobile Graphics Optimization Guides
Unity: Introduction
Basic Optimization and Unity Tips & Tricks by Yogie Aditya
Mobile optimization techniques
Unite2013-gavilan-pdf
Advanced Mobile Optimizations.ppt
Mobile Performance Tuning: Poor Man's Tips And Tricks
Unite2012 Click and Gun - Lighting workflow
Creating great Unity games for Windows 10 - Part 2
Ad

Recently uploaded (20)

PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Well-logging-methods_new................
PPTX
additive manufacturing of ss316l using mig welding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT
Project quality management in manufacturing
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
UNIT 4 Total Quality Management .pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Geodesy 1.pptx...............................................
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Sustainable Sites - Green Building Construction
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Foundation to blockchain - A guide to Blockchain Tech
bas. eng. economics group 4 presentation 1.pptx
R24 SURVEYING LAB MANUAL for civil enggi
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Well-logging-methods_new................
additive manufacturing of ss316l using mig welding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Project quality management in manufacturing
Lecture Notes Electrical Wiring System Components
UNIT 4 Total Quality Management .pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Geodesy 1.pptx...............................................
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Sustainable Sites - Green Building Construction
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Ad

Unity optimization techniques applied in Catan Universe

  • 2. 2 Content Day Time slot Topic Presenter 27.04.2017 15:00 - 15:10 Picks round All 15:10 - 15:45 Mobile performance improvement techniques adopted in Catan Rubén Torres Bonet 25.05.2017 Draft 15:00 - 15:15 Picks round 15:15 - 15:45 Who wants more spaghetti code? Unity Dependency Injection with Zenject Rubén Torres Bonet Open topic Assignee Open topic Assignee Plugin management in Unity The rendering pipeline UniRx Navmeshes Karma for Unity
  • 4. 4 Contents 1. Objectives 2. Starting point 3. Tooling: analyzing the gap 4. Memory management 5. Materials 6. Textures 7. Shaders 8. Audio 9. Camera imposter system 10. Power consumption 11. Conclusions
  • 5. 5 1. Objectives 1. Reduce startup time: < 30 s 2. Reduce loading times: scenes, instantiating 3. Smooth framerate: > 30 fps 4. No framerate spikes 5. Reduce power consumption Reference devices: - iOS: iPhone 5/5s - Android: Samsung S4
  • 6. 6 2. Starting point - On-going development version of Catan running on PC and WebGL - Gather hardware/software specs about devices: - CPU: brand, features, cores, frequency, cache size - GPU: frequency, cache levels, stream processors, fill-rate, OpenGL ES version (>= 3.0) - RAM: texture, audio, mesh sizes - Minimum OS version: native plugins - OpenGL ES Hardware DB - Unity Mobile Hardware Stats - GSMArena - Wikipedia Adreno specs - Catan scenes: - Launch time: 45s - Main menu: 1 FPS - In-game: 12 FPS
  • 7. 7 3. Analysis Tools sorted by my personal taste: 1. Unity Stats window: “FPS”, draw calls, triangles, batches 2. RenderDoc: GPU profiling/debugging 3. Unity Profiler: CPU profiling; also good for memory analysis 4. Frame Debugger 5. Snapdragon profiler, Adreno profiler: low-level metrics 6. Hdg Remote Debug: A/B performance analysis 7. Debug.Log 8. XCode profiler
  • 8. 8 3. RenderDoc Awesome: - Draw calls cost - Draw call debugger - Rendering pipeline examiner - Texture crawler (aka. stealer) - Mesh examination - Fragment debugging - Shader debugging - ... Check my (old) presentation about it
  • 9. 9 3. Snapdragon prof. For Snapdragon chipsets
  • 10. 10 3. Hdg remote debug - Unity plugin - Real-time examining and modifying of the Unity hierarchy - Target: an app running in a device (iOS, Android…) - Simple A/B testing for analysing performance issues: - Import plugin - Insert prefab - Open the remote hierarchy window - Introduce IP of the target device running your app - Examine hierarchy manually using binary search - Turn on/off individual GameObjects and components to check performance impact - Quick way of isolating bottlenecks - Use other tools to find the issue within the chosen GameObject/MonoBehaviour https://www.assetstore.unity3d.com/en/#!/content/61863
  • 11. 11 4. Memory management - Workflow: - You allocate some memory blocks too often - Unity triggers the (in)famous garbage collector, which it is itself garbage - All threads are blocked for a long period of time (between 50ms and 1s in mobile?) - Users are angry, dev gets fired - Main problem: most allocations are implicit and evil. There’s no new keyword involved, the dev doesn’t know about it till it’s too late - Typical issues: - Boxing: myNonGenericArrayList.Add(5); - LINQ, foreach - Dynamic instantiation of objects: use object pooling - Coroutines: starting & creation of yield operations (please cache them and use return null instead of 0 or boxing occurs) - When not caching lists but rather recreating them - Use the stack when possible instead of the heap
  • 12. 12 5. Materials - Unity offers no per-platform material system - Materials can be pretty expensive because of the shaders and textures - Solution? No solution, just workarounds - I created a build step that replaces material references in compile-time to their _desktop.mat and _mobile.mat counterparts - Don’t use standard shaders in mobile - Workflow: - After the builds are completed, please check what was included in it using BuildReport - An item (material, shaders, textures, audio...) you don’t like was included? Check its references with FindReferences2 - Use A+ Asset Explorer to quickly tweak texture settings (size, compression..:) and many other issues - Create platform-specific shaders when expensive
  • 13. 13 6. Textures - Texture compression: of uttermost importance on mobile: - Each texture fetch in fragment shaders will ask texture samplers for texels - The texture block cache access is likely to miss if you have lots of big textures, therefore producing a stall - It reduces startup and loading times, since textures are stored compressed both in permanent storage and RAM - It will also reduce the distributed package size (APK/IPA..) - If the format is not supported in the current architecture, it’ll be CPU-recompressed by Unity (longer loading times) - It can, however, produce artifacts and you have to consider the platform capabilities - Tweak texture size to your needs (screen size of the projected textures) - Advanced texture filtering (>= trilinear) is still expensive in mobile - Disable mipmapping when not needed (e.g. screen space UI) - Check that expensive textures maps are not included in the mobile build: heightmaps, detail maps, etc.
  • 14. 14 7. Shaders - Prefer lower precision variables in this order: fixed, half, float - Avoid standard shaders; go instead for Lambert or Phong lighting models - Do not have more than one light source. Mobile platforms support only forward rendering so that every light creates a new rendering pass - Do not use GrabPass (and therefore avoid post-effects), as they quickly stall the rendering pipeline and will quickly reach your fill-rate and bandwidth capabilities - Disable fog if not needed - Avoid mega-shaders and big shaders; compile times will be annoying (e.g. 10 s) - Fake lighting effects with unlit shaders with custom parameters - Disable shadow support if possible - Avoid alpha blending, as it breaks mobile GPU tiling optimizations and produces more overdraw - Consider introducing a z-prepass step in case of high overdraw and expensive fragment operations
  • 15. 15 8. Audio Check Unity profiler for memory usage first General recommendations: - If they are taking too much memory (> 30mb), find AudioClips that are rarely played and set them to streaming - If they are increasing loading times: - Set them to load in background (can get out of sync though) - Disable preload, but you might get a framerate spike the first time they use it - Set them to streaming, but that will cause CPU overhead Play with compression methods
  • 16. 16 9. Camera imposter system - We want the desktop quality in mobile - We know we can’t achieve it. But, can we fake it? - Let’s take the background objects and make a static screenshot of them. We can put that screenshot as a background picture in our scene - Wait, that doesn’t work quite well: - Depth information is lost - Editing workflow is slow (taking screenshots, positioning them, deploying) - Screenshots are resolution-dependent; we target heterogeneous devices and filtering would ruin its quality - My approach: - We render them in run-time with maximum quality at the beginning of the scene: - A first time to grab the color buffer - A second and last time to grab the depth buffer - We disable the original objects - We keep both textures in a RenderTexture - We draw both textures at the beginning of each frame with special shaders that output color and writes to the zbuffer
  • 17. 17 - It looks easy, doesn’t it? It is not - There are many limitations imposed by Unity and OpenGL ES - Still, I managed to render the whole background of the main menu scene of Catan with all post-effects: sheep, terrain, environment, trees - Advantages: - Huge quality in mobile comparable to desktop - High frame-rate - Flexible and fast workflow - Disadvantages: - The objects can only be static (although you can re-render manually at any time) - It is low-level and feels hacky. Unlikely, but it might break with future Unity releases and I’ll probably not be here to fix it - It doesn’t work on older phones, since shader depth-writing requires OpenGL ES > 3.0 - It requires compiling the post-effect shaders and the original meshes and textures still (obviously) 9. Camera imposter system
  • 18. 18 - Sources of power consumption: - CPU: - Intense calculations dissipate a lot of heat (power) - Requiring data that was used a long time ago breaks temporal locality -> cache miss -> bandwidth requirement - Asking for data that is distant from each other breaks spatial locality -> cache miss -> bandwidth requirement - Induce device wakelock by performing background operations when the screen is off - High frame-rate. Consider reducing it in some scenes (in highly static scenes 10FPS might be enough) - GPU: - Shader calculations eats most of it, especially if redundant (overdraw) - Large amount of objects taking a big screen area excessively loads the rasterizer, produces overdraw if not well sorted (e.g. transparency) and overloads shader processing units. - GrabPass and post-effects eat bandwidth like a boss - Screen: - Darker colors usually consume less energy - Other: - GPS is power-hungry slow communication channel that prevents wakelock, avoid tracking users - Making your game too addictive will also lead users to wasting lots of battery on it ;) - Micro-optimization: set clear flag to pure black 10. Power consumption
  • 19. 19 Conclusions To “unoptimize” your mobile game: - Don’t consider performance relevant from the beginning - Put post-effects everywhere. If possible, in multiple full-screen cameras. - Keep myriad of useless big textures in memory - Use complex mega-shaders with multiple light sources - Avoid static batching by forgetting to marking static flags - Break dynamic batching by applying non-uniform negative scaling - Reference unneeded materials because you can - Do intense alpha blending to break GPU tiling optimizations and create more overdraw - Do not cache coroutine yield instructions - Ignore the Pareto Principle
  • 20. 20 Conclusions To “unoptimize” your mobile game: - Use real-time reflection probes - Use LINQ and start coroutines in a per-frame basis - Using unsupported texture compression formats and disable mipmapping - Don’t bother to make atlases, even though it only takes a few clicks to enable it - Include uncompressed unoptimized audio even if you target deaf audience - Use GameObject.FindObjectsOfType and GameObject.Find - Use the hardware specs sheet as a beer/coffee coasters - Leave imported mesh colliders there - Use the new keyword on classes as often as your keyboards lets you type it - Be lazy enough to skip checking the contents of the final build
  • 21. 21 Conclusions And lastly, to “unoptimize” your mobile game... - Don’t communicate with colleagues when you are unsure about the performance impact of your changes We all are here to learn and improve (and some to gain money I’ve heard)
  • 22. 22