Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TryRemoveComponent<T>()

Removes the attached component of type T, if one is attached.
Read time 1 minuteLast updated 4 days ago

Definition

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

Returns

Type

Description

bool
true
if a component was removed;
false
if none was attached.