UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = “Game”)
I have specified a uproperty like this in a class called ATurret(derived from aactor)
I have not created subobject for this component in code.
I intend to do this :
"In blueprint I create sublass of this, add an arrow component and then reference it through the uproperty “firehelper” "
But the Uproperty does not show up in editor
EditAnywhere instead of
Could you clarify what you mean when you say it does not show up in the Editor? Are you wanting to be able to edit the properties of the Arrow Component in the Details panel? If so, you will need to create a default subobject in the code class’ constructor.
You can still access the parent class’ Arrow Component in the child Blueprint’s event graph, though, so you can set all of the properties that way if you need to. Keep in mind that if you add an Arrow Component to the child Blueprint, that Blueprint will now effectively have two Arrow Components.
I wanted to assign this component to arrow added in child class through detail panel
I guess it cant be done
Creating a subobject in base class is easier
The Editor does not have a way for you to choose a specific pre-existing Component to use as a Component in a Blueprint. So, for example, you would not be able to add an Arrow Component to a Blueprint and tell the Blueprint that you want to use the Arrow Component in the parent class for the newly created component. However, as long as the Component in the parent class is public, the child Blueprint will be able to access it so there should be no need to add the Component again in the child Blueprint. That doesn’t mean that there would never be a situation where you would want to add the Component a second time.