tsu icon indicating copy to clipboard operation
tsu copied to clipboard

"Add [...] Component" nodes aren't exposed

Open mihe opened this issue 5 years ago • 0 comments

These seem to be handled in blueprint through UK2Node_AddComponent.

The current workaround would be something similar to how it is in C++:

export function construct(target: BP_Foo, mesh: StaticMesh) {
    const component = new StaticMeshComponent(target);
    component.registerComponent();
    component.setStaticMesh(mesh);
    target.addOwnedComponent(component);
}

mihe avatar Mar 25 '19 19:03 mihe