Remove Debug methods in released games and during profiling
This package demonstrates a way to replace the standard Debug.Log and Debug.LogXXXX methods with ones which can be removed in non-development builds and while profiling.
Ever noticed how debug log lines can still take up processing time and generate garbage.
Have you ever concatenated strings and done variable conversions when using logging methods? e.g Debug.Log("Value = " + value.ToString());
Have you noticed this still costs CPU time in released builds and generates garbage, even though nothing happens to the debug method.
Well this package will wrap the Debug.Log and Debug.LogXXXX methods in a way which is completely compiled out when building release builds. You can also remove the messages by turning them off in the editor preferences. This is useful when profiling a development build.
Simply replace any instances of Debug.Log with DebugLogging.Log
Checkout the images to see how this works.