Unity rss
Unity forge
Object.ToString Manual     Reference     Scripting  
Scripting > Runtime Classes > Object
Object.ToString
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Object
  • All Members
  • Variables
  • hideFlags
  • name
  • Functions
  • GetInstanceID
  • ToString
  • Class Functions
  • Destroy
  • DestroyImmediate
  • DontDestroyOnLoad
  • FindObjectOfType
  • FindObjectsOfType
  • Instantiate
  • operator !=
  • operator ==
  • operator bool

function ToString () : string

Description

Returns the name of the game object.

JavaScripts
Debug.Log(gameObject);

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
Debug.Log(gameObject);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
Debug.Log(gameObject)


Unity3d Рекламный блок Unity3d