actors.components
Lists components owned by an actor, including runtime-created components.
Syntax
ue.actors.components(actor: ActorReference) -> table?, string?Parameters
| Parameter | Type | Description |
|---|---|---|
actor | ActorReference | String query or actor descriptor. |
Returns
| Type | Description |
|---|---|
table | Component descriptors with name, class, type, and propertyName. |
nil, string | Actor was not found. |
propertyName is nil for a runtime-created component that is not stored in a reflected actor property. Its type is "runtime".
Example
local components = assert(ue.actors.components("Player"))
for _, component in ipairs(components) do
print(component.name, component.class, component.propertyName)
endUse ue.components.find or its ue.get_component alias when you need a live UObjectProxy instead of descriptors.