Skip to content

UICanvas.FindByName Method

Definition

Namespace: Brine2D.UI

Overloads
FindByName\(string\) Searches all components \(including nested children\) for the first one whose Name matches name. Returns null if not found.
FindByName<T>\(string\) Typed overload — returns the first component with the given name that is assignable to T, or null.

UICanvas.FindByName\(string\) Method

Searches all components \(including nested children\) for the first one whose Name matches name. Returns null if not found.

C#
public Brine2D.UI.IUIComponent? FindByName(string name);

Parameters

name System.String

Returns

IUIComponent

UICanvas.FindByName\<T>\(string\) Method

Typed overload — returns the first component with the given name that is assignable to T, or null.

C#
public T? FindByName<T>(string name)
    where T : class, Brine2D.UI.IUIComponent;

Type parameters

T

Parameters

name System.String

Returns

T