SlideShare a Scribd company logo
1 of 45
Internals: Memory and Performance 
Codemotion 
Milano, 29/11/2014
About me 
Field Engineer @ Unity Technologies 
Past: 
o Worked as Software Engineer on several 
games at EA, Next Level Games, Milestone
Agenda 
• Quick Update 
• Memory Overview 
• Memory vsCycles 
• Graphics 
• Scripting
Latest News 
• New CEO 
• Unity 4.6 / New UI 
• Unity 5.0 
• Support for Apple iOS 64 bit 
• WebPlayer
Native and Managed Memory, Garbage Collection 
MEMORY OVERVIEW
Memory Overview 
• Native (internal) 
– Assets data, game objects and components 
– Engine internals 
• Managed (Mono) 
– Scripts objects (managed DLLs) 
– wrappers for Unity objects 
• Native Dlls 
– User’s and 3rd parties Dlls
Managed Memory Internals 
• Allocates system heap blocks for internal 
allocator 
• Will allocate new heap blocks when needed 
• Garbage collector cleans up 
• Heap blocks are kept in Mono for later use 
– Memory can be given back to the system after a 
while 
– …but it depends on the platform  don’t count 
on it 
• Fragmentation can cause new heap blocks 
even though memory is not exhausted
Reference vs Value Types 
Value types (bool, int, 
float, struct, ...) 
• Exist in stack memory 
• De-allocated when 
removed from the stack 
• No Garbage 
Reference types 
(classes) 
• Exist on the heap and 
are handled by the 
mono/.net GC 
• De-allocated when no 
longer referenced 
• Lots of Garbage
Garbage Collection 
• Roots are not collected in a GC.Collect 
– Thread stacks 
– CPU Registers 
– GC Handles (used by Unity to hold onto 
managed objects) 
– Static variables!! 
• Collection time scales with managed heap 
size 
– The more you allocate, the slower it gets
Temporary Allocations 
• Don’t use FindObjects or LINQ 
• Use StringBuilder for string concatenation 
• Reuse large temporary work buffers 
• ToString() 
• .tag  use CompareTag() instead
Internal Temporary Allocations 
Some Examples: 
– GetComponents<T> 
– Vector3[] Mesh.vertices 
– Camera[] Camera.allCameras 
– foreach 
• does not allocate by definition 
• However, there can be a small allocation, depending on 
the implementation of .GetEnumerator() 
5.x: We are working on new non-allocating versions
Data Layout 
struct Stuff 
{ 
int a; 
float b; 
bool c; 
string name; 
}; 
Stuff[] arrayOfStuff; 
int[] As; 
float[] Bs; 
bool[] Cs; 
string[] names;
Memory Fragmentation 
• Memory fragmentation is hard to account for 
– Fully unload dynamically allocated content 
– Switch to a blank scene before proceeding to next 
level 
• This scene could have a hook where you may pause the 
game long enough to sample if there is anything significant in 
memory 
• Ensure you clear out variables so GC.Collect will 
remove as much as possible 
• Avoid allocations where possible 
• Reuse objects where possible within a scene play 
• Clear them out for map load to clean the memory
Wrappers: Disposable Types 
Some Objects used in scripts have large 
native backing memory in unity 
– Memory not freed for some time… 
Managed Native 
WWW 
Compressed file 
Decompression buffer 
Decompressed file
Garbage Collection 
• GC.Collect 
– Runs on the main thread when 
• Mono exhausts the heap space 
• Or user calls System.GC.Collect() 
• Finalizers 
– Run on a separate thread 
• Controlled by mono 
• Can have several seconds delay 
• Unity native memory 
– Dispose() cleans up internal memory 
• Eventually called from finalizer 
• Manually call Dispose() to cleanup 
Main thread Finalizer thread 
www = null; 
new(someclass); 
//no more heap 
-> GC.Collect(); 
www.Dispose();
Wrappers for Unity Objects 
• Inherit from Object 
• Types: 
– GameObject 
– Assets: Texture2D, AudioClip, Mesh, etc… 
– Components: MeshRenderer, Transform, 
MonoBehaviour 
• Native Memory is released when Destroy 
is called
Best Practices 
• Reuse objects  Use object pools 
• Prefer stack-based allocations  Use 
struct instead of class 
• System.GC.Collect can be used to trigger 
collection 
• Calling it 6 times returns the unused 
memory to the OS 
• Manually call Dispose to cleanup 
immediately
Writable Meshes, Static & Dynamic Batching 
MEMORY VS CYCLES
Mesh Read/Write Option 
• It allows you to modify the mesh at run-time 
• If enabled, a system-copy of the Mesh will 
remain in memory 
• It is enabled by default 
• In some cases, disabling this option will 
not reduce the memory usage 
– Skinned meshes 
– iOS
Non-Uniform scaled Meshes 
We need to correctly transform vertex normals 
• Unity 4.x: 
– transform the mesh on the CPU 
– create an extra copy of the data 
• Unity 5.0 
– Scaled on GPU 
– Extra memory no longer needed
Static Batching 
What is it ? 
• It’s an optimization that reduces number of draw calls 
and state changes 
How do I enable it ? 
• In the player settings + Tag the object as static
Static Batching cont.ed 
How does it work internally ? 
• Build-time: Vertices are transformed to world-space 
• Run-time: Index buffer is created with indices 
of visible objects 
Unity 5.0: 
• Re-implemented static batching without 
copying of index buffers 
• Beware of misleading stats
Dynamic Batching 
What is it ? 
• Similar to Static Batching but it batches non-static 
objects at run-time 
How do I enable it ? 
• In the player settings 
• no need to tag. it auto-magically works…
Dynamic Batching cont.ed 
How does it work internally ? 
• objects are transformed to world space on 
the CPU 
• Temporary VB & IB are created 
• Rendered in one draw call
Render Paths, Command Buffers, Shadows 
GRAPHICS
Render Paths 
• Vertex Lit 
• Forward Rendering 
• First pass for ambient + directional light 
• One additional pass for each light hitting the object 
• Deferred Lighting 
• Two Geometry passes + Lighting 
• GBuffer: Normal + Specular, Depth
Deferred Shading 
• New Render Path in Unity 5 
• Only one Geometry pass 
• On Platforms with MRTs 
• Fallback is Forward Rendering
Deferred Shading 
Depth buffer + 4x32bit RTs: 
• RT0: diffuse color (rgb), unused (a) 
• RT1: spec color (rgb), roughness (a) 
• RT2: normal (rgb), unused (a). 
10.10.10.2 when available. 
• RT3: emission/light (rgb), unused (a) 
• Z: depth buffer & stencil
Command Buffers 
• Command buffers 
hold list of 
rendering 
commands 
• They can be set to 
execute at various 
points during 
camera rendering
Shadows 
• Directional Light: 
• Use CSM, up to 4 cascades 
• they are rendered into screen space to a 
32bit RT 
• Point Light: 
• Render 6 cube faces 
• Spot Light: 
• One shadow map per light
Mesh Skinning 
Different Implementations depending on platform: 
• x86: SSE 
• iOS/Android/WP8: Neon optimizations 
• D3D11/XBoxOne/GLES3.0: GPU 
• XBox360, WiiU: GPU (memexport) 
• PS3: SPU 
• WiiU: GPU w/ stream out 
Unity 5.0: Skinned meshes use less memory by 
sharing index buffers between instances
Best Practices 
• Try different Render Paths 
– Performance depends on scene and platform 
• Mix Realtime and Baked Lighting 
• Use Level-Of-Detail Techniques 
– Mesh, Texture, Shader
Scripting API and JIT compilation performance, allocations 
SCRIPTING
GetComponent<T> 
It asks the GameObject, for a component of 
the specified type: 
• The GO contains a list of Components 
• Each Component type is compared to T 
• The first Component of type T (or that 
derives from T), will be returned to the 
caller 
• Not too much overhead but it still needs to 
call into native code
Property Accessors 
• Most accessors will be removed in Unity 5.0 
• The objective is to reduce dependencies, 
therefore improve modularization 
• Transform will remain 
• Existing scripts will be converted. Example: 
in 5.0:
Transform Component 
• this.transform is the same as GetComponent<Transform>() 
• transform.position/rotation needs to: 
– find Transform component 
– Traverse hierarchy to calculate absolute position 
– Apply translation/rotation 
• transform internally stores the position relative to the parent 
– transform.localPosition = new Vector(…)  simple 
assignment 
– transform.position = new Vector(…)  costs the same if 
no father, otherwise it will need to traverse the hierarchy 
up to transform the abs position into local 
• finally, other components (collider, rigid body, light, camera, 
etc..) will be notified via messages
WWW class properties 
WWW.texture: Allocates a new Texture2D 
…another example is WWW.audioClip
Object.Instantiate 
API: 
• Object Instantiate(Object, Vector3, Quaternion); 
• Object Instantiate(Object); 
Implementation: 
• Clone GameObject Hierarchy and Components 
• Copy Properties 
• Awake 
• Apply new Transform (if provided)
Object.Instantiate cont.ed 
• Awake can be expensive 
• AwakeFromLoad (main thread) 
– clear states 
– internal state caching 
– pre-compute 
Unity 5.0: 
• Allocations have been reduced 
• Some inner loops for copying the data have been 
optimized
JIT Compilation 
What is it ? 
• The process in which machine code is generated from 
CIL code during the application's run-time 
Pros: 
• It generates optimized code for the current platform 
Cons: 
• Each time a method is called for the first time, the 
application will suffer a certain performance penalty 
because of the compilation
JIT compilation spikes 
What about pre-JITting ? 
• RuntimeHelpers.PrepareMethod does not work: 
…better to use MethodHandle.GetFunctionPointer()
CONCLUSIONS
Best Practices 
• Don’t make assumptions 
• Platform X != Platform Y 
• Profile on target device 
• Editor != Player 
• Managed Memory is not returned to Native 
Land! 
• For best results…: Profile early and regularly
Want to know more ? 
• Unite: http://unity3d.com/unite/archive 
• Blog: http://blog.unity3d.com 
• Forum: http://forum.unity3d.com 
• Support: support@unity3d.com
That’s it! 
Questions? 
@m_trive | marcot@unity3d.com

More Related Content

What's hot

Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Unity Technologies
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunElectronic Arts / DICE
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Unity Technologies
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...Colin Barré-Brisebois
 
A Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemA Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemBo Li
 
Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game EngineJohan Andersson
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lightingozlael ozlael
 
Killzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo PostmortemKillzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo PostmortemGuerrilla
 
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019Unity Technologies
 
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019Optimize your game with the Profile Analyzer - Unite Copenhagen 2019
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019Unity Technologies
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overheadCass Everitt
 
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019devCAT Studio, NEXON
 
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Unity Technologies
 
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsColin Barré-Brisebois
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Johan Andersson
 
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019Unity Technologies
 
DirectStroage프로그래밍소개
DirectStroage프로그래밍소개DirectStroage프로그래밍소개
DirectStroage프로그래밍소개YEONG-CHEON YOU
 

What's hot (20)

Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
 
A Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemA Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering System
 
Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game Engine
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Killzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo PostmortemKillzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo Postmortem
 
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
 
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019Optimize your game with the Profile Analyzer - Unite Copenhagen 2019
Optimize your game with the Profile Analyzer - Unite Copenhagen 2019
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overhead
 
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019
전형규, SilvervineUE4Lua: UE4에서 Lua 사용하기, NDC2019
 
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019 Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
Intrinsics: Low-level engine development with Burst - Unite Copenhagen 2019
 
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019
Refresh what you know about AssetDatabase.Refresh()- Unite Copenhagen 2019
 
DirectStroage프로그래밍소개
DirectStroage프로그래밍소개DirectStroage프로그래밍소개
DirectStroage프로그래밍소개
 

Viewers also liked

EA: Optimization of mobile Unity application
EA: Optimization of mobile Unity applicationEA: Optimization of mobile Unity application
EA: Optimization of mobile Unity applicationDevGAMM Conference
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsHolger Gruen
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection ielaya1984
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksValentin Simonov
 
Unity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and ToolsUnity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and ToolsIntel® Software
 
Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Taras Leskiv
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureFelipe Lira
 
Screen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarineScreen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarinePope Kim
 
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)ozlael ozlael
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizationspjcozzi
 
hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmrajivagarwal23dei
 

Viewers also liked (11)

EA: Optimization of mobile Unity application
EA: Optimization of mobile Unity applicationEA: Optimization of mobile Unity application
EA: Optimization of mobile Unity application
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection i
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And Tricks
 
Unity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and ToolsUnity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and Tools
 
Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
 
Screen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarineScreen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space Marine
 
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizations
 
hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithm
 

Similar to Unity - Internals: memory and performance

Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnGuerrilla
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法Unite2017Tokyo
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法Unity Technologies Japan K.K.
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Unity Technologies
 
Optimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark HarknessOptimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark Harknessozlael ozlael
 
A New Tracer for Reverse Engineering - PacSec 2010
A New Tracer for Reverse Engineering - PacSec 2010A New Tracer for Reverse Engineering - PacSec 2010
A New Tracer for Reverse Engineering - PacSec 2010Tsukasa Oi
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Daosheng Mu
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
 
Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Peter Hlavaty
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in UnityWilliam Hugo Yang
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonJean-Philippe Doiron
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~Unity Technologies Japan K.K.
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Networking Architecture of Warframe
Networking Architecture of WarframeNetworking Architecture of Warframe
Networking Architecture of WarframeMaciej Siniło
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraJon Haddad
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Techizzaa
 

Similar to Unity - Internals: memory and performance (20)

Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero Dawn
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
 
0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri
 
Optimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark HarknessOptimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark Harkness
 
A New Tracer for Reverse Engineering - PacSec 2010
A New Tracer for Reverse Engineering - PacSec 2010A New Tracer for Reverse Engineering - PacSec 2010
A New Tracer for Reverse Engineering - PacSec 2010
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 
Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie Tycoon
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Networking Architecture of Warframe
Networking Architecture of WarframeNetworking Architecture of Warframe
Networking Architecture of Warframe
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - Cassandra
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)
 

More from Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Recently uploaded

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Unity - Internals: memory and performance

  • 1. Internals: Memory and Performance Codemotion Milano, 29/11/2014
  • 2. About me Field Engineer @ Unity Technologies Past: o Worked as Software Engineer on several games at EA, Next Level Games, Milestone
  • 3. Agenda • Quick Update • Memory Overview • Memory vsCycles • Graphics • Scripting
  • 4. Latest News • New CEO • Unity 4.6 / New UI • Unity 5.0 • Support for Apple iOS 64 bit • WebPlayer
  • 5. Native and Managed Memory, Garbage Collection MEMORY OVERVIEW
  • 6. Memory Overview • Native (internal) – Assets data, game objects and components – Engine internals • Managed (Mono) – Scripts objects (managed DLLs) – wrappers for Unity objects • Native Dlls – User’s and 3rd parties Dlls
  • 7. Managed Memory Internals • Allocates system heap blocks for internal allocator • Will allocate new heap blocks when needed • Garbage collector cleans up • Heap blocks are kept in Mono for later use – Memory can be given back to the system after a while – …but it depends on the platform  don’t count on it • Fragmentation can cause new heap blocks even though memory is not exhausted
  • 8. Reference vs Value Types Value types (bool, int, float, struct, ...) • Exist in stack memory • De-allocated when removed from the stack • No Garbage Reference types (classes) • Exist on the heap and are handled by the mono/.net GC • De-allocated when no longer referenced • Lots of Garbage
  • 9. Garbage Collection • Roots are not collected in a GC.Collect – Thread stacks – CPU Registers – GC Handles (used by Unity to hold onto managed objects) – Static variables!! • Collection time scales with managed heap size – The more you allocate, the slower it gets
  • 10. Temporary Allocations • Don’t use FindObjects or LINQ • Use StringBuilder for string concatenation • Reuse large temporary work buffers • ToString() • .tag  use CompareTag() instead
  • 11. Internal Temporary Allocations Some Examples: – GetComponents<T> – Vector3[] Mesh.vertices – Camera[] Camera.allCameras – foreach • does not allocate by definition • However, there can be a small allocation, depending on the implementation of .GetEnumerator() 5.x: We are working on new non-allocating versions
  • 12. Data Layout struct Stuff { int a; float b; bool c; string name; }; Stuff[] arrayOfStuff; int[] As; float[] Bs; bool[] Cs; string[] names;
  • 13. Memory Fragmentation • Memory fragmentation is hard to account for – Fully unload dynamically allocated content – Switch to a blank scene before proceeding to next level • This scene could have a hook where you may pause the game long enough to sample if there is anything significant in memory • Ensure you clear out variables so GC.Collect will remove as much as possible • Avoid allocations where possible • Reuse objects where possible within a scene play • Clear them out for map load to clean the memory
  • 14. Wrappers: Disposable Types Some Objects used in scripts have large native backing memory in unity – Memory not freed for some time… Managed Native WWW Compressed file Decompression buffer Decompressed file
  • 15. Garbage Collection • GC.Collect – Runs on the main thread when • Mono exhausts the heap space • Or user calls System.GC.Collect() • Finalizers – Run on a separate thread • Controlled by mono • Can have several seconds delay • Unity native memory – Dispose() cleans up internal memory • Eventually called from finalizer • Manually call Dispose() to cleanup Main thread Finalizer thread www = null; new(someclass); //no more heap -> GC.Collect(); www.Dispose();
  • 16. Wrappers for Unity Objects • Inherit from Object • Types: – GameObject – Assets: Texture2D, AudioClip, Mesh, etc… – Components: MeshRenderer, Transform, MonoBehaviour • Native Memory is released when Destroy is called
  • 17. Best Practices • Reuse objects  Use object pools • Prefer stack-based allocations  Use struct instead of class • System.GC.Collect can be used to trigger collection • Calling it 6 times returns the unused memory to the OS • Manually call Dispose to cleanup immediately
  • 18. Writable Meshes, Static & Dynamic Batching MEMORY VS CYCLES
  • 19. Mesh Read/Write Option • It allows you to modify the mesh at run-time • If enabled, a system-copy of the Mesh will remain in memory • It is enabled by default • In some cases, disabling this option will not reduce the memory usage – Skinned meshes – iOS
  • 20. Non-Uniform scaled Meshes We need to correctly transform vertex normals • Unity 4.x: – transform the mesh on the CPU – create an extra copy of the data • Unity 5.0 – Scaled on GPU – Extra memory no longer needed
  • 21. Static Batching What is it ? • It’s an optimization that reduces number of draw calls and state changes How do I enable it ? • In the player settings + Tag the object as static
  • 22. Static Batching cont.ed How does it work internally ? • Build-time: Vertices are transformed to world-space • Run-time: Index buffer is created with indices of visible objects Unity 5.0: • Re-implemented static batching without copying of index buffers • Beware of misleading stats
  • 23. Dynamic Batching What is it ? • Similar to Static Batching but it batches non-static objects at run-time How do I enable it ? • In the player settings • no need to tag. it auto-magically works…
  • 24. Dynamic Batching cont.ed How does it work internally ? • objects are transformed to world space on the CPU • Temporary VB & IB are created • Rendered in one draw call
  • 25. Render Paths, Command Buffers, Shadows GRAPHICS
  • 26. Render Paths • Vertex Lit • Forward Rendering • First pass for ambient + directional light • One additional pass for each light hitting the object • Deferred Lighting • Two Geometry passes + Lighting • GBuffer: Normal + Specular, Depth
  • 27. Deferred Shading • New Render Path in Unity 5 • Only one Geometry pass • On Platforms with MRTs • Fallback is Forward Rendering
  • 28. Deferred Shading Depth buffer + 4x32bit RTs: • RT0: diffuse color (rgb), unused (a) • RT1: spec color (rgb), roughness (a) • RT2: normal (rgb), unused (a). 10.10.10.2 when available. • RT3: emission/light (rgb), unused (a) • Z: depth buffer & stencil
  • 29. Command Buffers • Command buffers hold list of rendering commands • They can be set to execute at various points during camera rendering
  • 30. Shadows • Directional Light: • Use CSM, up to 4 cascades • they are rendered into screen space to a 32bit RT • Point Light: • Render 6 cube faces • Spot Light: • One shadow map per light
  • 31. Mesh Skinning Different Implementations depending on platform: • x86: SSE • iOS/Android/WP8: Neon optimizations • D3D11/XBoxOne/GLES3.0: GPU • XBox360, WiiU: GPU (memexport) • PS3: SPU • WiiU: GPU w/ stream out Unity 5.0: Skinned meshes use less memory by sharing index buffers between instances
  • 32. Best Practices • Try different Render Paths – Performance depends on scene and platform • Mix Realtime and Baked Lighting • Use Level-Of-Detail Techniques – Mesh, Texture, Shader
  • 33. Scripting API and JIT compilation performance, allocations SCRIPTING
  • 34. GetComponent<T> It asks the GameObject, for a component of the specified type: • The GO contains a list of Components • Each Component type is compared to T • The first Component of type T (or that derives from T), will be returned to the caller • Not too much overhead but it still needs to call into native code
  • 35. Property Accessors • Most accessors will be removed in Unity 5.0 • The objective is to reduce dependencies, therefore improve modularization • Transform will remain • Existing scripts will be converted. Example: in 5.0:
  • 36. Transform Component • this.transform is the same as GetComponent<Transform>() • transform.position/rotation needs to: – find Transform component – Traverse hierarchy to calculate absolute position – Apply translation/rotation • transform internally stores the position relative to the parent – transform.localPosition = new Vector(…)  simple assignment – transform.position = new Vector(…)  costs the same if no father, otherwise it will need to traverse the hierarchy up to transform the abs position into local • finally, other components (collider, rigid body, light, camera, etc..) will be notified via messages
  • 37. WWW class properties WWW.texture: Allocates a new Texture2D …another example is WWW.audioClip
  • 38. Object.Instantiate API: • Object Instantiate(Object, Vector3, Quaternion); • Object Instantiate(Object); Implementation: • Clone GameObject Hierarchy and Components • Copy Properties • Awake • Apply new Transform (if provided)
  • 39. Object.Instantiate cont.ed • Awake can be expensive • AwakeFromLoad (main thread) – clear states – internal state caching – pre-compute Unity 5.0: • Allocations have been reduced • Some inner loops for copying the data have been optimized
  • 40. JIT Compilation What is it ? • The process in which machine code is generated from CIL code during the application's run-time Pros: • It generates optimized code for the current platform Cons: • Each time a method is called for the first time, the application will suffer a certain performance penalty because of the compilation
  • 41. JIT compilation spikes What about pre-JITting ? • RuntimeHelpers.PrepareMethod does not work: …better to use MethodHandle.GetFunctionPointer()
  • 43. Best Practices • Don’t make assumptions • Platform X != Platform Y • Profile on target device • Editor != Player • Managed Memory is not returned to Native Land! • For best results…: Profile early and regularly
  • 44. Want to know more ? • Unite: http://unity3d.com/unite/archive • Blog: http://blog.unity3d.com • Forum: http://forum.unity3d.com • Support: support@unity3d.com
  • 45. That’s it! Questions? @m_trive | marcot@unity3d.com

Editor's Notes

  1. Benefits of this talk
  2. The memory in unity is split up in managed and native memory. The managed memory is what is used from Mono, and includes what you allocate in scripts and the shells for unity objects. This memory is garbage collected by mono The native memory is what Unity is allocating to hold everything in the engine. This includes Asset data like tex, mesh, audio, animation. It includes gameobjects and components, and then it covers engine internals like redering , culling, shaderlab, particles, webstreams, files, physics, etc…. This memory is not garbage collected, and sometimes needs the UnloadUnusedAssets method call to be freed. *notes from Kim’s Unite Asia 2014 presentation Native (internal) Asset Data: Textures, AudioClips, Meshes Game Objects & Components: Transform, etc.. Engine Internals: Managers, Rendering, Physics, etc.. Managed - Mono Script objects (Managed dlls) Wrappers for Unity objects: Game objects, assets, components Native Dlls Unity’s : DirectX, User’s external dll’s
  3. The managed memory used by mono reserves a block of memory to use for the allocations requested from your scripts. If more memory is needed mono will allocate more heap space. This will grow to fit the peak memory usage of your application. When the memory is being freed, mono can in some cases give the heap space back to the system. When the heapspace is exhausted, mono will run the garbage collecter to reclaim memory that is no longer being referenced. This can be a timeconsuming operation specially on large games. This is one of the reasons to keep the memory activity low. Another reason is that with high memory activity, memory is likely to fragment and the small memory fragments will be unusable and cause memory to grow *slide and notes from Kim’s Unite Asia 2014 presentation
  4. System.GC.Collect can be used to trigger a collection of managed memory
  5. Don’t use FindObjects or LINQ They both allocate temp variables on the heap In .Net pre 2.0, "" creates an object while String.Empty creates no object. So WAS more efficient to use String.Empty.
  6. for some types, GetEnumerator() returns a class. if you foreach those, you'll have an allocation if it returns a struct, it does not allocate
  7. Everything is scanned. GC takes more time Only array of strings is scanned. GC takes less time
  8. Some objects that you can new in scripts have large native memory footprints in unity. An example of that is the WWW class which in mono is only a wrapper, but in Unity it contains some very large allocations. This backing memory is not cleaned up until the finalizers are run, or Dispose is called manually. If this is left to the garbage collector and the finalizers, this memory can potentially live long after the reference is removed from mono. The reason for this is that mono does not see this as a large allocation because of the small footprint of the wrapper. Slide and notes from Kim.
  9. So the way the garbage collector works is shown here. A reference is removed from mono by setting the reference to null or the object going out of scope. After a while the garbage collector will run, either because the heapspace gets exhausted, or because we manually call GC.Collect() When the memory is collected by the garbagecollectorit is put on a queue for the finalizer. This is handled by another thread, and eventually the finalizer will call Dispose on the object. At this point the unity native memory will be deallocated. To skip this roundtrip, you can call Dispose manually on the object, and then the object will not be given to the finalizers and the memory will be cleaned up imediately. I have a small example that shows this *slide and notes from Kim’s Unite Asia 2014 presentation
  10. “C# is a language that allows you to quickly write powerful code. However the downside to this is that writing natural C# code produces a lot of garbage. The only way around this is to eliminate or reduce your heap allocations” Garbage Collection: It’s very expensive, especially on mobile - Pre-allocate and keep lists of inactive objects . Use object pools. An implementation is on the AS: https://www.assetstore.unity3d.com/#/content/1010 Keep lists of inactive objects, like bullets for example Calling GC.Collect 6 times: OSX, IOS and Android, Windows and WP8 don’t seem to work. The platform should implement mmap. REMOVED: Using structs will benefit GC performance GC only traverse managed allocations
  11. Texture Read/Write Enabled: it will DOUBLE the amount of memory required for texture asset. - Unity 5.x: will be disabled by default
  12. Non-uniform scaling has a negative impact on rendering performance + memory overhead: It's only done every frame if the transform changes every frame. Of course the memory is still used, as long as the object exists. 5.0: - Non-uniformly scaled meshes no longer incur any memory cost or performance hit. Instead of being scaled on the CPU they are scaled and lit correctly in shaders. - This also means that meshes that have the Read/Write Enabled option unchecked in their import settings will be lit correctly when they are scaled differently in x,y,z direction at runtime.
  13. What is it ? It’s an optimization that It reduces number of draw calls and state changes by batching static objects with the same material reduces the number of draw calls (CPU/GPU time) and state changes… but it increases memory usage Not supported on PS3
  14. It costs memory and cycles at runtime to create index buffer Unity 5.0: Re-implemented static batching without copying of index buffers (faster)
  15. What is it ? It’s an optimization that It reduces number of draw calls and state changes by dynamically batching objects with the same material It batches “small” objects with the same material Dynamic batching is done automatically (if mesh meets the requirements) Conditions: Object must be affected by the same set of lights There is a limit of 300 vertices per object. There is a limit on the number of channels * vertices of the combined mesh = 900. E.g: If you have position + normal + uv = 300 vertices max. (3 * 300 = 900) If you have position + normal + uv0 + uv1 + tangent = 180 verts max. (3 * 180 = 900) Non-uniform scaling and uniform scaled meshes are batched reparately. GameObjects with uniform scale must have the same scale. For example (1,1,1) and (2,2,2) cannot be batched together. The combined mesh can only have up to 32000 indices (to workaround an issue with MacBookPros) and 2^16 vertices (the limit for any mesh in Unity). Ojects must share the same material Multi-pass rendering. If one pass gets batched and another does not, then there's mismatch between vertex positions, resulting in Z-fighting. Result is: many per-pixel lights, shadows etc. disable dynamic batching. Not supported on PS3/X360
  16. Unity 5.x: we are considering to expose per-platform parameters
  17. Fat G-buffer. Right now 4x32bit render targets, plus 32 bit Z buffer (160 bits/pixel); add 32 more bits when HDR (emission/light buffer is rgba16f when in HDR). - RT0: diffuse color (rgb), unused (a) - RT1: spec color (rgb), roughness (a) - RT2: normal (rgb), unused (a). 10.10.10.2 when available. - RT3: emission/light (rgb), unused (a) Z: depth buffer & stencil It will be customizable in Unity 5.x
  18. Render Loop Customization It allows you to “inject” draw calls during the rendering loop before/after specific camera “events”: DepthTexture Lighting Image Effects etc…
  19. You can query for any Component using QueryComponent and GetComponent This will Ask every component in the GO if it is derived from the wanted class Internal: /// The difference between QueryComponent and GetComponent is that /// QueryComponent returns a ptr, GetComponent returns a reference /// but asserts if no matching component could be found /// Also you are not allowed to Query for Component classes /// that are in the GameObject more than once.
  20. Prefer WWW.LoadImageIntoTexture
  21. Instantiate is SLOW Prefabs at a fundamental level. They are a collection of predefined GameObjects & Components that are re-usable throughout your game. Clones the object original and returns the clone. When you clone a GameObject or Component, all child objects and components will also be cloned with their properties set like those of the original object. However, the parent of the new object will be null, so it will not be a "sibling" of the original. However, you can still set the parent explicitly if you wish. Also, the active status of a GameObject at the time of cloning will be passed on, so if the original is inactive then the clone will be created in an inactive state too.
  22. Unity 5.0 optimizations: Biggest wins will be on big game object / transform hierarchies.
  23. Some platforms like consoles or ios use ahead-of-time scripts compilation, which means the scripts are compiled at build time. Other platforms, like Android use JIT compilation. JIT Compilation: The process in which machine code is generated from Common Intermediate Language code during the application's run-time
  24. Can we warm up specific functions ? Like we do for shaders
  25. Use Profiler.BeginSample/EndSample To profile your own code Reserved Total: it's the managed memory high watermark