Version: 2020.3
언어: 한국어

Object

class in UnityEngine

매뉴얼로 전환

설명

Base class for all objects Unity can reference.

Any public variable you make that derives from Object gets shown in the inspector as a drop target, allowing you to set the value from the GUI. UnityEngine.Object is the base class of all built-in Unity objects.

Although Object is a class it is not intended to be used widely in script. However as an example Object is used in the Resources class. See Resources.LoadAll which has [[Object[]]] as a return.

This class doesn't support the null-conditional operator (?.) and the null-coalescing operator (??).

변수

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public 함수

GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the object.

정적 함수

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.

연산자

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.