Hidden UPROPERTY array in USTRUCT slows Editor to a crawl

Hi, I’ve got an Actor Class which I want to edit in the Details Panel, it has an Array of another Struct which has data I also want to add/edit from there.

This all works fine, but the second Struct contains an Array of another Struct which can be in the thousands of items.

That Array is BlueprintReadWrite only and Hidden, It doesn’t show in the Details Panel as I want, but for some reason the UI is still enumerating all the items in that Array which is slowing the Editor down to a crawl.

I’m looking for a way to stop the UI (Details Panel) from looking at that Array at all.

Main Class

UCLASS()
class RDINST_PLUGIN_API ArdSpawnStuffActor : public ArdActor {
	GENERATED_BODY()
public:
...
	UPROPERTY(EditAnywhere,Category="1. Object Data")
	TArray<FrdSpawnStuffData> spawnData={FrdSpawnStuffData()};
...
};

Struct referenced in the Classes Array

USTRUCT(BlueprintType)
struct FrdSpawnStuffData {
	GENERATED_BODY()
public:
...
	UPROPERTY(BlueprintReadWrite,meta=(HideInDetailPanel))
	TArray<FrdBakedSpawnObjects>	bakedData;
...
};

I’ve tried playing around with a “CustomizeDetails” hook and tried changed the visibility etc but nothing seems to help.

I can add the meta “MaxPropertyDepth=1” to the Actors Array to only display the list of items in the array without listing the properties in those items which keeps it fast - but I need to be able to edit the other data in those items.

One thing that would work, is if in the CustomizeDetails, I could change that “MaxPropertyDepth” meta to “2” - but I can’t find any way to dynamically change meta’s (probably not possible).

By any chance do you know of a way to stop the UI from parsing that hidden large Array?

Thanks.

This is a complete shot in the dark, but have you tried this in your UPROPERTY?

meta = (EditCondition = false, EditConditionHides)

You can change the EditCondition to be another boolean property or even use same code if you want to show it.

Sidenote: the docs say that HideInDetailPanel is only for events. Maybe that’s why it’s not working as intended.

1 Like

Thanks for the response!

Yes that was the first thing I tried - it’s still enumerating them.

I’ve discovered that removing the BakedData array doesn’t change the stalls, it’s stalling from an array directly in the class only containing 1800 items.

Yeah I didn’t think the HideInDetailPanel was doing anything, it’s more the BlueprintReadWrite without any EditAnywhere or VisibleAnywhere that should be stopping the DetailsPanel from parsing it afaik.

I found that the HISMC has a system where it hides them unless you click the button - I’m going to reverse engineer that and see if I can reproduce. If it works I’ll post the solution here.

Ok, well that was easy - they’re using a customization hook, and marking the property as “HiddenByCustomization”

			// If there are too many instances to display, hide the property as it will slow down the UI : 
			if (bTooManyInstances && !bForceShowAllInstances)
			{
				PerInstanceSMDataProperty->MarkHiddenByCustomization();
			}
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.