기술 자료

Unity Engine

Unity Engine

GetComponent<T>()

Returns a component of type T. For PlayerSettings, returns the global fallback if no PlayerSettings component is found. Returns null if the component isn't available.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public T GetComponent<T>() where T : Object

Returns

Type

Description

TSettings component type to fetch. Expects a ScriptableObject implementation or PlayerSettings.

Remarks

Note: This function is restricted to ScriptableObject types or PlayerSettings.