# print(object)

> Logs a message to the Unity Console. Functionally equivalent to Debug.Log.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## print(Object)

```csharp
public static void print(object message)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The message to display in the console.

### Remarks

The `print` method is a functionally equivalent alternative to [Debug.Log](/engine/6000.6/script-reference/unityengine/debug/log.md) when used in a Monobehaviour script. Refer to [Debug.Log](/engine/6000.6/script-reference/unityengine/debug/log.md) for more information.

Additional Resources: [Debug.Log](/engine/6000.6/script-reference/unityengine/debug/log.md), [Debug.LogWarning](/engine/6000.6/script-reference/unityengine/debug/logwarning.md), [Debug.LogError](/engine/6000.6/script-reference/unityengine/debug/logerror.md).

### Examples

```csharp
using UnityEngine;

public class PrintExample : MonoBehaviour
{
    public int playerHealth = 85;
    public int maxHealth = 100;

    void Start()
    {
        // Simply print a message in the console
        print("The Start method has been called.");

        // Log variables using string interpolation
        print($"Initial player health: {playerHealth}");

        // Log a variable using formatting
        float healthPercentage = playerHealth / (float)maxHealth;
        print($"The player's total score is: {healthPercentage:F2}");
    }
}
```
