After starting to using blueprint component classes I noticed this bug.
Create a Blueprint from a ActorComponent class, for example from a c++ class derived from UStaticMeshComponent with UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent)) specified.
Create a Blueprint from a Actor class.
In the actor blueprint, use AddComponent and add your ActorComponent Blueprint, it is under the Custom group.
Notice that GetComponents function will then return duplicates of the component you added. The duplicate will be named with _C suffix. The UClass seems to be the same though, it is not a template.
Adding your ActorComponent Blueprint by code with NewObject with the ActorComponent Blueprint class as parameter does not cause this bug and if you do that no duplicate is created.
Yes, it occurs in a blank project.
I don’t have a screenshot, but there is two instances of every added component and when doing breakpoints in Visual the list of components is twice the size.
No, they are still there after you have compiled the blueprint,
Does this only occur in blueprints that are derived from custom C++ classes or has it occurred in blueprints that are derived directly from blueprint classes?
I never tested that. I created one c++ class derived from UStaticMeshComponent and one c++ class derived from USplineMeshComponent. Then I created one component blueprint class from each of those two, and then added those as components to an actor blueprint class. In both cases the components were duplicated. This did not happen when I added them with NewObject<> in c++ code, it only happened when I added them with Add Component in the blueprint editor.
Unfortunately I was unable to reproduce this with the steps given. Do you have a test project I can view this occurring in?
We have not heard from you in several days. I am marking this as answered for tracking purposes, if you are still experiencing this error, please comment with the requested information.
The duplicate only shows up when doing Play. It is not visible in the blueprint editor.
Can you post a sample project where this is occurring so I can take a look? It may help to discover what is causing the error you are seeing.