标记您希望从控制台窗口调用堆栈中隐藏的方法。当您隐藏这些方法时,它们将从控制台窗口中所选消息的详细信息区域中删除。
要隐藏标记的方法,请单击控制台菜单按钮,然后从菜单中选择Strip logging callstack。
using UnityEngine;
public class HideInCallstackExample : MonoBehaviour { void Start() { HiddenDebug("[HideInCallstack] Debug message here."); VisibleDebug("Debug message here."); }
// Hidden in the detail area of the message in the console window. [HideInCallstack] public static void HiddenDebug(object logMsg) { Debug.Log(logMsg); }
// Visible in the detail area of the message in the console window. public static void VisibleDebug(string logMsg) { Debug.Log(logMsg); } }