PostEditChangeChainProperty is called after struct is modified

Thumper
Thu, 23 Sep 2021 00:39:43 +0000
Pipeline & Plugins

I have TMap <FString, CustomActorPtr*> . When using PostEditChangeChainProperty to catch struct modifications (TMaps are structs) like “Add, Remove, Clear” these modifications occur first then PostEditChangeChainProperty is called. This is practically useless.

In my situation I want to catch all of these before they have done anything to the struct so that I can direct how they are performed. For instance - with “Add” a TPair is created with None as the Key and nullptr as the value. I want to spawn the actor - assign it a name and use this name as the Key, and a ptr to it as the value. I’m able to get around this by first clearing the TMap, and then adding a new TPair with after I have spawned the actor.

Here’s where the real problem comes in - If I want to “Clear” - it’ll clear the TMap but the PTRs I had stored are now gone so I can’t easily get the actors for destroy(). So now I have spawned actors that I can’t easily access because PostEditChangeChainProperty is called after the modification has already taken place.

2 posts - 2 participants