Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active May 19, 2023 02:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/049e68297723572b6f19709bfd2d3d6a to your computer and use it in GitHub Desktop.
Save tsubaki/049e68297723572b6f19709bfd2d3d6a to your computer and use it in GitHub Desktop.
ログの出力を停止する
using UnityEngine;
using System.Collections;
public class LogTest : MonoBehaviour
{
// ゲーム開始前に呼び出す
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Init () {
Debug.logger.logEnabled = false; // ←ログを止める
}
void Update ()
{
Debug.Log ("hoge"); // <- ログは出力されない
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment