Version: 2017.1
public string ToString ();

설명

Returns the name of the game object.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { Debug.Log(gameObject); } }