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"

Values for component properties not actually being deleted

I have a c++ component with a property exposed to the editor:

 UPROPERTY(EditAnywhere)
 TArray<FVector> ThrusterLocations;

I have added this component to a blueprint class and I can edit the values of the array: alt text

At one point I added 4 values to the array and then I deleted them and took the screenshot above.

The problem is that the 4 values that I deleted are obviously still being loaded into that array at runtime. I have verified this through on-screen debugging and by stepping through the c++ code that iterates that array.

If I change the default values pictured above they DO propagate to runtime.

If I add more values they DO NOT propogate to runtime.

The editor crashed when I removed the UPROPERTY macro and tryed to compile through the editor. It crashed again when I added the macro back and tried to compile. I was doing this in an attempt to reset whatever datastore these values are saved in.

Product Version: UE 4.9
Tags:
ue4bugpic.png (7.3 kB)
more ▼

asked Oct 14 '15 at 01:52 AM in Bug Reports

avatar image

BerenCamlost
21 1 3

avatar image Shadowriver Oct 14 '15 at 04:15 AM

So you edit defaults right? Where do you check the array? When you spawn it?

avatar image BerenCamlost Oct 14 '15 at 05:30 PM

Yes I edit the defaults. I check the array while the game is playing.

This screenshot shows my debug lines. There should only be 4 of each color (since there are only 4 values in the array according to the gui) but there are 8. The 4 that should not be there are in the exact place they should be if I hadn't deleted the last 4 values of the array. alt text

ue4bugpic2.png (226.3 kB)
avatar image Doug E ♦♦ STAFF Oct 14 '15 at 02:11 PM

Hey BerenCamlost-

Can you elaborate on what exactly is happening? Creating a scene component class and adding it to a blueprint, I was able to add/delete elements in my array without issue. How and when are you deleting the array elements? Are you adding/deleting them from inside the blueprint or while running PIE?

Cheers

Doug Wilson

avatar image BerenCamlost Oct 14 '15 at 05:21 PM

I am editing them from inside the blueprint (remind me what PIE stands for?). Graphically everything is working just fine. So when I make changes to the values at index 0,1,2, or 3 the changes show up at runtime. The problem is that the values at indexes 4,5,6, and 7 are still being loaded at runtime. If, using the gui from within the blueprint, I once again add values at indexes 4,5,6, and 7 and then edit the values to be different than the values I used previously then I see the original values instead of the new ones.

GUI State 1. Defaults in c++ constructor. Runtime state is in sync:

 0: -50,50,0
 1: 50,50,0
 2: 50,-50,0
 3: -50,-50,0

GUI State 2. My first modification to the values made through the blueprint gui. runtime state is in sync:

 0: -50,50,0
 1: 50,50,0
 2: 50,-50,0
 3: -50,-50,0
 4: 25,0,0
 5: 0,25,0
 6: -25,0,0
 7: 0,-25,0

GUI State 3. I then deleted these new values (this is where the screenshot is from) but the runtime state matches GUI State 2:

 0: -50,50,0
 1: 50,50,0
 2: 50,-50,0
 3: -50,-50,0

GUI State 4. I then tried re-adding different values at those indexes with the gui but the runtime state matches State 2:

 0: -50,50,0
 1: 50,50,0
 2: 50,-50,0
 3: -50,-50,0
 4: 10,0,0
 5: 0,125,0
 6: -3,0,0
 7: 0,-456,0

avatar image Doug E ♦♦ STAFF Oct 14 '15 at 05:56 PM

By PIE I was referring to "play-in-editor". So you start with 4 default values in code and then add 4 values inside the editor and run play-in-editor to test. Then you remove the 4 values added and run play-in-editor again, but the removed values are still present? Am I understanding the steps you're taking to creating/removing the values to/from your array correctly? If there is anything I've missed can you list out the steps you used so that I can try to reproduce what you're seeing on my end?

avatar image BerenCamlost Oct 14 '15 at 06:03 PM

You have everything right. The only other step would be the step I mentioned in GUI state 4 where I re-add 4 values and, when I PIE, the old values (from GUI State 2) are still present rather than the new values (from GUI State 4).

avatar image Doug E ♦♦ STAFF Oct 14 '15 at 06:10 PM

I'm still not seeing the behavior you're describing. If possible could you send me your project to test this issue directly? If you're able to upload the project to dropbox you can send me a private message on the forums with a link to download it for privacy.

avatar image BerenCamlost Oct 14 '15 at 06:21 PM

Is it alright if I remove the contents of Binaries/Win64 and Content/StarterContent to reduce the size? My isp caps uploads at 4mbps.

avatar image Doug E ♦♦ STAFF Oct 14 '15 at 06:26 PM

The important folders are the Config, Content (minus StarterContent), Source, as well as the .uprjoect file. Binaries, Intermediate, Saved, and the .sln and .suo files can all be stripped out.

avatar image BerenCamlost Oct 14 '15 at 09:42 PM

I linked you the project by the way.

avatar image Doug E ♦♦ STAFF Oct 15 '15 at 03:09 PM

After adding/removing additional elements to the thruster location array I was left with the original 4 thrusters. Here are the steps I took to test

  • placed instance of Racerwithhoverpad into the level and play in editor (4 thrusters)

  • exit play in editor and open Racerwithhoverpad blueprint

  • added 4 elements to Thruster Location array and set them to the values you posted

  • play in editor again (8 thrusters)

  • exit play in editor and reopen the blueprint

  • click the drop-down arrow next to the elements added to delete them

  • compile the blueprint and play in editor again (back down to 4 thrusters)

After doing these steps and removing the thrusters from the array I was left with the original 4 thrusters along the corners of the the mesh. Can you let me know if following these exact steps if you still have 8 thrusters ?

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

1 answer: sort voted first

I created a new instance of the blueprint and followed your steps and everything worked correctly. The old instance still has 8 thrusters though: alt text

The only thing I did differently when the problem started was that I used the reset button (yellow looping arrow icon) to go back from 8 to 4 thrusters. However, I tested that method with the new instance and it worked correctly. In any case, I can at least get around the problem by using a new instance.

ue4bugpic3.png (238.7 kB)
more ▼

answered Oct 15 '15 at 09:11 PM

avatar image

BerenCamlost
21 1 3

avatar image Doug E ♦♦ STAFF Oct 16 '15 at 04:59 PM

Since using a new instance works to solve the issue for you I am going to mark this as fixed for tracking purposes. If you have the same issue occur with the new instance as well feel free to comment here to reopen the post for further investigation.

Cheers

Doug Wilson

(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