Download

"Component Name" in "Physics Constraint Component" won't work with Editor only components

( Note: This is either a bug or just an undocumented assumption of how to use the editor/engine, so i decided to post it in the documentation section )

Description of the Problem:
In the “Component Name” fields of the physics constraint component one cannot use/select components which are only defined via the Editor.
If the components are inherited from a blueprint they are correctly found. If the Components where defined in C++ the will also be found.

This is a bit complicated to explain, so i’ll start with what i wanted to do. This was done in the Editor, without using Blueprints or a custom C++ Actor:
My Unreal Engine Version is 4.8.3

What i did:

  1. Add an empty Actor
  2. Add 2 StaticMeshComponents
  3. Add a Physics Constraint Component
  4. Enter “StaticMesh” in the field “Component Name 1” of the physics constraint component
  5. Enter “StaticMesh1” in the field “Component Name 2” of the physics constraint component

What i expected: Highlighting in the Editor and a working physics constraint
screen2.png

What i got: No highlighting, constraint not working.
95459e23e3431e095ad21491ae01ad2d4b91d1c0.jpeg

How to get the constraint working:
Click “Blueprint/Add Script” in the Actor Details panel, or define the actor in c++ with explicit members/fields for both meshes.

Please either add this limitation to the documentation of the physics constraint component ( and possible the actor, or any other places where the user can select components this way ) or make it possible to use components here regardless of wether they are coming from an blueprint/c++ or have only been added in the editor.

I know it’s pretty new to be able to create actors and add components directly in the editor without requiring a blueprint, so this is probably something experienced ue4 developers won’t do.
However as it is pretty common in unity to directly create entities and add components to them, this should be correctly working here to, or at least be made clear in the docs that this kind of usage won’t work.

A more technical Description ( i’m not entirely sure if i am right here):
It seems like components added in the Editor are not registered/visible as fields of an UStruct. If this is used to let the user select components via their Name ( as in the physics constraint components ), only components from blueprints or c++ will be found.

I’m happy to give more explanations or a level example if my description is not clear enough.