"Unity Memory Optimization "
1. In the Update method or loop, use the string class less, because each operation of the string class calls new to generate a fresh string object. The use of StringBuilder instead of String,stringbuilder is based on the fixed buffer operation, thus avoiding the allocation of memory.
For example, when you write this code, the compiler actually creates a new string object to hold the new sequence of characters, and the new object is assigned to B. The string "H" will then be appropriate for garbage collection.
2. The iOS platform uses PVRTC to compress textures. The Adroid platform is compressed using the ETC1 format. can be reduced to 1/4 of the memory size. Optimization is very obvious.
Currently, mainstream Android models support ETC1 format compression. However, ETC1 can only support image compression for non-alpha channels. Therefore, the alpha channel diagram is generally separated out , when plotted to GPU memory, a value is obtained from the Alpha graph, no alpha channel diagram can be used ETC1 compression.
Unity Memory Optimization