WorksDocumentation

Add an Actor Component

Choose a component class

AddComponent accepts an exact full component class path or a short name that uniquely matches a currently loaded class; ambiguous short names are rejected with sorted full-path candidates. It rejects non-ActorComponent, abstract, deprecated, superseded, and ClassWithin-incompatible classes. The tool follows Unreal Editor’s creation order: it adds the instance component to the serialized array, sends the creation notification, and registers the component. If attachment, root assignment, or registration fails, it removes the new component and cancels the transaction.

Identify the target actor before choosing the class to add. If the short name matches more than one class, pick the intended full path from the returned candidates before trying again. After creation, check the new component and where it is attached on the actor.