x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can I get array member before deleting it at detail panel?

Hello,

I have an array with self-defined struct. When I delete a member in this array, I need to store the variable for further usage.

For example in following picture, I want to get "StartID" when the member at index 0 is pending delete.

alt text

I've tried PostEditChangeChainProperty, but the member was already deleted at the moment.

Then I looked into PreEditChange(UProperty* PropertyAboutToChange), but the input UProperty seems can't get members in TArray. And I wonder how to know it is pending delete, not som else action.

I also found PreEditChange(FEditPropertyChain & PropertyAboutToChange), but have no idea how it works.

Does anyone have a clue? Any help would be appreciated.

Update:

I successfully get the TArray of struct by UProperty::ContainerPtrToValuePtr. What a magical thing.

The rest problem is how to know this array member is pending delete?

Product Version: UE 4.18
Tags:
more ▼

asked Apr 20 '18 at 07:57 AM in C++ Programming

avatar image

deen_shiu
6 3 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I found that using destructor in struct , I can get anything I want before delete array member.

This problem has been solved.

more ▼

answered Apr 23 '18 at 02:01 AM

avatar image

deen_shiu
6 3 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question