| | 1 | | using System.Diagnostics; |
| | 2 | | using UnityEngine; |
| | 3 | | using Debug = UnityEngine.Debug; |
| | 4 | |
|
| | 5 | | namespace DCL |
| | 6 | | { |
| | 7 | | /// <summary> |
| | 8 | | /// Remove any calls from compilation to prevent string allocations |
| | 9 | | /// </summary> |
| | 10 | | public static class MeshCombinerLogger |
| | 11 | | { |
| | 12 | | public const string COMPILATION_DEFINE = "MESH_COMBINER_VERBOSE"; |
| | 13 | |
|
| | 14 | | [Conditional(COMPILATION_DEFINE)] |
| | 15 | | public static void Log(object message) |
| | 16 | | { |
| 0 | 17 | | Debug.Log(message); |
| 0 | 18 | | } |
| | 19 | |
|
| | 20 | | [Conditional(COMPILATION_DEFINE)] |
| | 21 | | public static void Log(object message, Object context) |
| | 22 | | { |
| 0 | 23 | | Debug.Log(message, context); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Warnings are not omitted |
| | 28 | | /// </summary> |
| | 29 | | public static void LogWarning(object message) |
| | 30 | | { |
| 0 | 31 | | Debug.LogWarning(message); |
| 0 | 32 | | } |
| | 33 | |
|
| | 34 | | public static void LogError(object message) |
| | 35 | | { |
| 0 | 36 | | Debug.LogError(message); |
| 0 | 37 | | } |
| | 38 | | } |
| | 39 | | } |