コード例 #1
0
    void OnEnable()
    {
        // Connect to or create the backend
        if (!EditorLogger)
        {
            EditorLogger = UberLogger.Logger.GetLogger <UberLoggerEditor>();
            if (!EditorLogger)
            {
                EditorLogger = UberLoggerEditor.Create();
            }
        }

        // UberLogger doesn't allow for duplicate loggers, so this is safe
        // And, due to Unity serialisation stuff, necessary to do to it here.
        UberLogger.Logger.AddLogger(EditorLogger);
        EditorLogger.AddWindow(this);

// _OR_NEWER only became available from 5.3
#if UNITY_5 || UNITY_5_3_OR_NEWER
        titleContent.text = "Uber Console";
#else
        title = "Uber Console";
#endif

        ClearSelectedMessage();

        SmallErrorIcon   = EditorGUIUtility.FindTexture("d_console.erroricon.sml");
        SmallWarningIcon = EditorGUIUtility.FindTexture("d_console.warnicon.sml");
        SmallMessageIcon = EditorGUIUtility.FindTexture("d_console.infoicon.sml");
        ErrorIcon        = SmallErrorIcon;
        WarningIcon      = SmallWarningIcon;
        MessageIcon      = SmallMessageIcon;
        Dirty            = true;
        Repaint();
    }
コード例 #2
0
        void OnEnable()
        {
            // Connect to or create the backend
            if (!EditorLogger)
            {
                EditorLogger = Logger.GetLogger <uNodeLoggerEditor>();
                if (!EditorLogger)
                {
                    EditorLogger = uNodeLoggerEditor.Create();
                }
            }

            Logger.AddLogger(EditorLogger);
            EditorLogger.AddWindow(this);
            titleContent.text = "uNode Console";
            ClearSelectedMessage();

            SmallErrorIcon   = EditorGUIUtility.FindTexture("d_console.erroricon.sml");
            SmallWarningIcon = EditorGUIUtility.FindTexture("d_console.warnicon.sml");
            SmallMessageIcon = EditorGUIUtility.FindTexture("d_console.infoicon.sml");
            ErrorIcon        = SmallErrorIcon;
            WarningIcon      = SmallWarningIcon;
            MessageIcon      = SmallMessageIcon;
            Dirty            = true;
            Repaint();
        }