Description

It is not possible to edit the properties in the Details panel inside the Blueprint editor for a component inherited from the parent code class, if the default subobject for that component was created using a string that exactly matches the variable name of a component in the parent of the code class.

For example, adding a UAIPerceptionComponent to a code class that derives from AIController, and creating the default subobject using the string "PerceptionComponent" prevents the properties of the UAIPerceptionComponent from being edited in the Blueprint. This was also tested using a UInputComponent with the string "InputComponent" in a class that derives from Actor.

If the string used when creating the default subobject for the component is changed so that it does not match any variable names in the parent class, then the properties for the component can be updated. However, if the Blueprint has already been created prior to this change, it needs to be recreated in order for the change to take effect.

Steps to Reproduce
  1. Create a new Basic Code project.
  2. Add a new code class that derives from AIController.
  3. Add AIModule to the public dependency module names in the project's Build.cs file.
  4. Include Perception/AIPerceptionComponent.h in the header file for the new AIController class.
  5. Add a UAIPerceptionComponent property to the new AIController class.
    • eg:
      private:
      	UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
      	class UAIPerceptionComponent* m_perceptionComponent;
      
  6. Add a constructor for the AIController class.
  7. In the constructor for the AIController class, create a default subobject for the new UAIPerceptionComponent. Make sure to include the string "PerceptionComponent".
    • eg:
      m_perceptionComponent = CreateDefaultSubobject<UAIPerceptionComponent>("m_perceptionComponent");
      
  8. Build the project in Visual Studio.
  9. Open the project in the Editor.
  10. Create a Blueprint from the new AIController class.
  11. Open the Blueprint.
  12. Select the inherited m_perceptionComponent.

RESULT:
The properties for the m_perceptionComponent cannot be edited in the Details panel.

EXPECTED:
The properties for the m_perceptionComponent are all visible and can be edited in the Details panel.

WORKAROUND:
Make sure the string used when creating a default subobject is not the same as the variable name of a component. If the Blueprint has already been created before using this workaround, the Blueprint must be created again in order for the properties to be visible.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-59330 in the post.

2
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.18.34.19.24.20
CreatedMay 18, 2018
ResolvedAug 18, 2021
UpdatedAug 18, 2021