Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HasComponent<T>()

Checks whether a component of type T is attached to this element.
Read time 1 minuteLast updated 6 days ago

Definition

public bool HasComponent<T>() where T : struct, IVisualElementComponent

Returns

Type

Description

bool
true
if the component is attached; otherwise
false
.