Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ToObject

Returns any valid Unity Object held by the search item.
Read time 1 minuteLast updated 11 days ago

Definition

ToObject()

Returns any valid Unity Object held by the search item.
public Object ToObject()

Returns

Type

Description

ObjectReturns a Unity Object or null if there is none.

Remarks

See SearchProvider.toObject more information on what it means to convert a SearchItem to a Object.

ToObject(Type)

Returns any valid Unity Object held by the search item.
public Object ToObject(Type type)

Parameters

type

Used to validate if the object is assignable to Type.

Returns

Type

Description

ObjectReturns a Unity Object or null if there is none.

Remarks

See SearchProvider.toObject more information on what it means to convert a SearchItem to a Object.

ToObject<T>()

Returns any valid Unity Object held by the search item.
public T ToObject<T>() where T : Object

Returns

Type

Description

TUsed to validate if the object is assignable to T.