Scripting API

RequireComponent

attribute in UnityEngine · UnityEngine.CoreModule · inherits from Attribute

4 of 4 of Unity's membersUnity's documentation
In Tassix

Adds the listed components automatically when this one is added.

Constructors 1

RequireComponent(Type requiredComponent)
RequireComponent(Type requiredComponent, Type requiredComponent2)
RequireComponent(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)

Fields 3

Type? m_Type0
Type? m_Type1
Type? m_Type2

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.