zoukankan      html  css  js  c++  java
  • 关于 filterLogType

    filterLogType默认设置是Log,会显示所有类型的Log。

    Warning:会显示Warning,Assert,Error,Exception

    Assert:会显示Assert,Error,Exception

    Error:显示Error和Exception

    Exception:只会显示Exception

    使用:

    using UnityEngine;

    public class Test : MonoBehaviour
    {
    private BoxCollider boxCollider;
    void Start()
    {
    DebugTrace.Instance.SetLogOptions(true, 2, editorCreate: true); //设置日志打开 显示2帧 并且编辑器下产生日志
    DebugTrace.Instance.StartTrace();
    Debug.Log("log");
    Debug.Log("log", this);
    Debug.LogError("LogError");
    Debug.LogAssertion("LogAssertion");

    boxCollider.enabled = false; //报错 发布后捕捉不到帧
    }

    private void OnApplicationQuit()
    {
    DebugTrace.Instance.CloseTrace();
    }
    }
    如果在编辑器中也设置产生日志,日志文件在当前项目路径下,打包后在exe同级目录下

    在打包发布后某些数据会获取不到 例如行号 参考:

    最后看下效果:

  • 相关阅读:
    docker
    opencart
    Why is setTimeout(fn, 0) sometimes useful?
    linux下php环境配置
    xampp for linux
    Where to go from here
    freefcw/hustoj Install Guide
    khan academy js
    SDWebImage
    基于OpenCV 的iOS开发
  • 原文地址:https://www.cnblogs.com/hyhy904/p/11661041.html
Copyright © 2011-2022 走看看