“debug.log Unity” Código de respuesta

Impresión de unidad a consola

// To print in the console use "Debug.Log()"
Debug.Log("Text");
SkelliBoi

debug.log Unity

Debug.Log("Hello, World");
Comfortable Caterpillar

Unidad impresa vs registro de depuración

In Unity C#, Debug.Log() and print() are functionally identical
print() is just a bit easier to remember than Debug.Log()

print() is inherited from the MonoBehavior class, so any project without
public class ExampleClass : MonoBehavior {}
will not be able to use print()
MandMs05

debug.log Unity

using UnityEngine;
using System.Collections;

public class MyGameClass : MonoBehaviour
{
    void Start()
    {
       	Debug.Log("Logging Message to Console");
    	Debug.LogWarning("Logging Warning to Console");
        Debug.LogError("Logging Error to Console");
    }
}
ALeonidou

Deshabilitar debug.log Unity

#if UNITY_EDITOR
 Debug.logger.logEnabled = true;
 #else
 Debug.logger.logEnabled = false;
 #endif
Pleasant Puma

Respuestas similares a “debug.log Unity”

Preguntas similares a “debug.log Unity”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código