Description

Adding a struct to the foliage panel results in the struct not being editable for a static mesh instance. The same struct is editable if applied to a PrimitiveComponent.

Steps to Reproduce
  1. Create a new code project using the First Person template.
    • Make sure to use an Engine built from source code.
  2. Open the FoliageType.h file in the source code and add the following struct:
    USTRUCT()
    struct FLightingChannelContainer
    {
    	GENERATED_USTRUCT_BODY()
    
    	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = LightingChannels, meta = (DisplayName = "Static"))
    	uint32 Channel0 : 1;
    
    	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = LightingChannels, meta = (DisplayName = "Dynamic"))
    	uint32 Channel1 : 1;
    
    	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = LightingChannels, meta = (DisplayName = "Cinematic1"))
    	uint32 Channel2 : 1;
    
    	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = LightingChannels, meta = (DisplayName = "Cinematic2"))
    	uint32 Channel3 : 1;
    
    	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = LightingChannels, meta = (DisplayName = "Cinematic3"))
    	uint32 Channel4 : 1;
    };
    
  3. In the same file, add the following UPROPERTY:
    UPROPERTY(EditAnywhere, BlueprintReadOnly, AdvancedDisplay, Category = Lighting)
    FLightingChannelContainer LightingChannels;
    
  4. Build the project in Visual Studio.
  5. Open the project in the Editor.
  6. Click on the Foliage tab in the Modes window.
  7. Select Fill.
  8. Add a static mesh to the Fill settings.
  9. Select Show Instance for the static mesh that was just added.
  10. Go to the Lighting section of the settings and expand the Advanced Display section.

RESULTS:
The LightingChannels struct is shown, but cannot be edited.

EXPECTED:
The LightingChannels struct is editable.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
CreatedDec 17, 2014
ResolvedJul 8, 2016
UpdatedJul 14, 2021