Strip release build from all Debug.Log calls

An easier way - create a custom logger class that uses the ConditionalAttribute over all of its methods.

Logging will be made only when defining the proper compiler define symbol for the logger (ENABLE_LOG).
I actually planned to add a build-time feature that will convert/strip calls to the logger in the final build together with this logger.

If anyone thinks that’s a useful idea i might actually do it and release that to the asset store.

2292960–154242–Logger.cs (2.43 KB)

13 Likes