Exemple #1
0
 public override void AssertMessage(string message, string stackTrace)
 {
     CEditor.ShowDialog("Assertion", message + "\n" + stackTrace,
                        new CEditor.DialogButton("Ignore"),
                        new CEditor.DialogButton("Show", delegate()
     {
         CEditor.OpenFileExternal(stackTrace);
     }),
                        new CEditor.DialogButton("Stop", delegate()
     {
         if (Application.isPlaying)
         {
             Debug.DebugBreak();
         }
     })
                        );
 }
        //////////////////////////////////////////////////////////////////////////////

        public override bool OnMouseDoubleClick(CEvent evt)
        {
            if (!string.IsNullOrEmpty(StackTrace))
            {
                if (CEditor.OpenFileExternal(StackTrace))
                {
                    return(true);
                }
            }
            else if (this.LogLevel == CLogLevel.Error || this.LogLevel == CLogLevel.Warn)
            {
                CSourcePathEntry element;
                if (CEditorStackTrace.TryParseCompilerMessage(m_value, out element))
                {
                    if (CEditor.OpenFileAtLineExternal(element.sourcePath, element.lineNumber))
                    {
                        return(true);
                    }
                }
            }

            return(base.OnMouseDoubleClick(evt));
        }