Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Debug.logger

マニュアルに切り替える
public static ILogger logger;

説明

デフォルトのデバッグロガーを取得します。

デフォルトのロガーを使用して Unity Console にメッセージを記録します。

See Also: ILogger, ILogHandler.

using UnityEngine;
using System.Collections;

public class MyGameClass : MonoBehaviour { private static ILogger logger = Debug.logger; private static string kTAG = "MyGameTag";

void MyGameMethod() { logger.Log(kTAG, "Hello");

Debug.logger.Log(kTAG, "World"); } }