public static void LogMethodCall(eChannelType channel) { if( DEBUG_CHANNELS[(int)channel] == true ) { StackFrame sf = new StackFrame(1); MethodBase mb = sf.GetMethod(); System.Type t = mb.DeclaringType; string s = System.String.Format(channel.ToString() + ": " + "METHODCALL {0}::{1} \n", t.Name, mb.Name); UnityEngine.Debug.Log(s); if( OnLogMethodCall != null ) { OnLogMethodCall(null, new DbgEventArgs(s)); } } }
public static void SetDebugChannel(eChannelType channel, bool state) { DEBUG_CHANNELS[(int)channel] = state; string s = channel.ToString() + ": CHANNEL IS " + state.ToString() + "\n"; UnityEngine.Debug.Log(s); if( OnSetDebugChannel != null ) { OnSetDebugChannel(null, new DbgEventArgs(s)); } }
public static void Log(eChannelType channel, string message) { if( DEBUG_CHANNELS[(int)channel] == true ) { string s = channel.ToString() + ": " + message + "\n"; UnityEngine.Debug.Log(s); if( OnLog != null ) { OnLog(null, new DbgEventArgs(s)); } } }