Skip to main content

MLStreamingBrowser.TryGetComponent(TComponent type)

Gets the component of the specified type, if it exists.

Parameters:

NameTypeDescription
typeTComponentThe type of the component to retrieve.

Returns:

typeDescription
booleanReturns true if the component is found, false otherwise.
TComponentThe output argument that will contain the component or nil.

Usage

---@type MLStreamingBrowser
local mlstreamingbrowser;

---@type TComponent
local type;


local val0, val1 = mlstreamingbrowser.TryGetComponent(type)

Example

exists, component = myComponent.TryGetComponent(Transform);
-- exists is a boolean
-- component is Component or nil