Last active
May 19, 2023 02:45
-
-
Save tsubaki/049e68297723572b6f19709bfd2d3d6a to your computer and use it in GitHub Desktop.
ログの出力を停止する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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