-------------------------------------
UPR : Code Analysis
=========================Memory Start=========================
Problem
The property Renderer.sharedMaterials allocates managed memory.
Solution
Use Renderer.GetSharedMaterials() instead.
Problem
Component.GetComponentsInChildren() allocates managed memory.
Solution
Ensure you are using one of the versions of GameObject.GetComponentsInChildren() which accepts a List<T> as a parameter and populates it with the components it finds.
Problem