I've broken project by moving/adding files, had a little fun on it.

I’ve just stopped typing question to answers.unrealengine, cuz’ I’ve just fixed problem while was typing message :cool:
This happens really often: I’am typing question, doing logic attack, actually, and viola, mistake has been found!
I’ve downed compilation errors count from 210-220 to 3 and only 1 on these 3 is actually error.
I should also mention that now this error is still exist, but I’am switching between browser and Visual Studio and trying to understand where this is happening.
That’s what would have to be asked, if I had not found error:

*Well, 2 days ago I thought: “Why don’t I move file so they looks more sorted? There is already more than 30 files, I think I need to do something until I get lost.”
I regretted. And I also forgot to create a backup…
I’ve also created object UDynamicParameter, but it is not used anywhere (it’s working and compiling, by the way).
That’s how my project look’s like right now: *


*Previously there was no pairs BulletData, DynamicParameter, GunData, SetupData (contained in Objects filter).
Now magic: see that include (SetupData.h) in the opened source file (Bullet.h)?
In compilation errors list down there is no error about this include (I mean it is founded), so possibly types in this include should work fine, but nope.
Before rearranging files: struct FBulletSetup was directly in Bullet.h, so types included else where just fine and Bullet.generated.h was necessary. There is also been struct FGunSetup and that was… Strange at least.
After: FBulletSetup is now in Public/Objects/BulletData.h… And I’ve included SetupData.h, Excellent! *

About current error: I’ve understood, that it is about constructor, that contains something private (for some reason), that TArray cannot initialize.

I mean, that sometimes mega-huge problem might be very-very small, just a one string.

About current error again: Compiled OK - 0 errors, 0 warnings. I made it!

Once there was problem even worse: Runtime error, and I think the worst might happen. Imagine this: happens randomly, but mostly when I stop PIE; if I shoot once - fine, if I shoot twice - crash; debugger stops somewhere in the middle of mscorlib, shows me binary code and message “memory access violated”.
Can you guess what happened?

I had made one little-huge mistake: custom destructor in UObject derived class. Yep. After I done with this class I was just destroying it, but custom destructor was interfering with internal, and so Garbage Collector was trying to delete class, that already not exists. This took me 2 weeks to understand what is wrong.

I don’t know about the C code but if you move assets inside the editor you have to click the folder you moved from and the click “Fix references”, after this you can delete the old folder from your systems explorer.

ps. always make backups.

Yeah, now I really will make backups.
And I can’t launch editor without compiled code. I wanted very much, but was unable to fix code folder from inside editor. :slight_smile:
Many times randomly “Generated Solution Files”… Files are founded and “compiled” just fine, most problem was that I thought that I was including right .h…