Version:
2021.1
2020.2
2020.1
2019.2
2019.1
2018.3
Back to list
Scene :: hasComponent
Synopsis
Returns True if the given occurrence has the given component type
GUI Dialog
Script function
scene.hasComponent
(
occurrence
,
componentType
[,
followPrototypes
]) ->
hasComp
Parameters
occurrence
(
Occurrence
) : The occurrence
componentType
(
ComponentType
) : Type of the component
followPrototypes
(
Bool
)
[optional]
: If true and if the component is not set on the occurrence, try to find it on its prototyping chain
Return value
hasComp
(
Boolean
) :