I am trying to repeat a command that adds a component using the “Add Component” button.
I need to create the same ImagePlateComponent for SceneComponent but with Python code.
I execute code in Output Log:
scene_component = camera.scene_component image_component = unreal.ImagePlateComponent() image_component.k2_attach_to(scene_component, socket_name="None", attach_type=unreal.AttachLocation.KEEP_RELATIVE_OFFSET, weld_simulated_bodies=True)
But the ImagePlateComponent generated by the python code is different from the one created through the “Add Component” button:
for i in range(scene_component.get_num_children_components()): print scene_component.get_child_component(i) LogPython: <Object '/Game/fbxLevel.fbxLevel:PersistentLevel.cam_for_UE.CameraComponent' (0x000001CA2F795600) Class 'CineCameraComponent'> LogPython: <Object '/Game/fbxLevel.fbxLevel:PersistentLevel.cam_for_UE.ImagePlate' (0x000001CA2B87C100) Class 'ImagePlateComponent'> LogPython: <Object '/Engine/Transient.ImagePlateComponent_0' (0x000001CA2B5B1D00) Class 'ImagePlateComponent'>
- second line: the component created by the “Add Component” button
- third line: component created by python code
I do not see the ImagePlateComponent (that creates the python code) in the Details panel.
**unreal.Actor **article says that a new component must be registered. But how to do that?
I can not find the required method
How do I add an ImagePlateComponent so that it displays under the SceneComponent as attachement?