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"

c++ Empty Array

Hi, I've got the modular Construction Tool that Shoiko did. But it seems to be crashing a lot. mainly when exiting play in viewport. and also exiting the Editor. Chatting to Shoiko he said its seems to be because of the empty the Array. here is the line of code that is trying to be emptied.`enter code here`

 GENERATED_USTRUCT_BODY()
 
         UPROPERTY()
         TArray<ABuildingModTile*> Column;
 
     FTiles::~FTiles(){
         Column.Empty();

Once I open the editor back up it seems to be duplicating the InstancedStaticMeshComponents and paste the original meshes outside the blueprint and here is a pic of the World Outliner

alt text

As you can see the Yellow is the meshes that it moved and the red is the duplicated in the blueprint. Does anyone know how to fix this cleanUp so it won't do this and also not crash the editor.

Product Version: Not Selected
Tags:
buildingmesh.jpg (178.6 kB)
more ▼

asked Mar 31 '15 at 05:26 AM in C++ Programming

avatar image

seandennis
106 18 27 31

avatar image MakinBaconPancakes Mar 31 '15 at 06:43 AM

There doesn't really seem to be enough code here for me to really understand why the destructor is crashing. Try posting your problem to the thread associated with the addon here:

https://forums.unrealengine.com/showthread.php?61270-Modular-Construction-Tool-(Updated-3-5-2015)

avatar image seandennis Mar 31 '15 at 06:52 AM

I did Mak, Shoiko said it has to do with the emptying part of the script and its not emptying the Array and he is trying to figure out why its not emptying the Array and causing it to crash. I tried and set the destroy on empty to true but that didn't change anything.

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

0 answers: sort voted first
Be the first one to answer this question
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