I like the way I can drag and drop UStaticMesh properties. There’s also a way to open asset browser for such fields and start typing the name of the mesh.
What I want is to have the same way of referencing existing components.
For example I have components “first” and “second” both of the custom type inherited from UStaticMeshComponent and want to reference “first” from the second in the special field.
First that comes to my mind is to create a field like that
UPROPERTY(EditAnywhere, BlueprintReadWrite) UStaticMeshComponent *refToAnotherComponent;
In this case when I click on this field in UI I see the list of types, not specific objects with names.
I can also create a text field like
UPROPERTY(EditAnywhere, BlueprintReadWrite) FString nameOfAnotherComponent;
but in this case I have no way of listing existing items in UI, only typing. It is potentially dangerous because provides no check for the existance of such name.
So is there actually a way to have a property which provides the list of names? Or can you imagine any workaround for such case?