Download

I tried to clean up my project by moving items...Now everything is broken!

I had been loading assets into my project in a rather disorganized way so attempted to organize things by making new folders and moving assets in the new folders. Some of these assets were already in folders so I simply moved those folders into the new folders as well. I noticed folders in their original locations weren’t going away after having moved them but they were empty so I just tried to delete them. But they wouldn’t delete from within Unreal. So I went to Explorer to delete them there. But upon reloading my project it complained that it couldn’t find the files from that original location. So I moved the folder from it’s new location to its old location to make it happy. But it didn’t make it happy because now when reloading the project it complains that it can’t find the files from new location!

Speaking with some people in Discord, I’ve learned that I should have used Migrate instead of Move. If moving is just going to make a mess not actually completely move anything, why even have it as an option!? Who in their right mind would want to move assets AND THEN create a bunch of pointer files for those assets to tell Unreal where the assets were moved to? No one! That’s who!

At any rate. If i can’t just move my folders and file back to their original location, and I can’t delete thee folders and pointer files, how the heck can I fix this without having to restart my entire project over from scratch and without breaking things further? It feels like my entire week and half Christmas break is going to be wasted on just trying to fix this problem when my plan was to actually complete this part of the project. I won’t lie, I’m more than just a little upset over this. I really hope there’s a really easy fix for this.

Thank you.

You should have backups!

Use something like bzr, perforce or any other version control system.
Then every day zip whole forlder, name it like “MyProject-added pickups” or whatever you made last, helps later to find version you had something that later you ruined.
And keep backups on 2 separate hdds,

1 Like

Great tip! I never would have thought of that!

Seriously though, I hadn’t gotten to that point yet because all I was doing was loading and placing assets. I wasn’t doing anything that would have made me worried something would break enough that a backup would be needed yet. Having been using computers and working in IT for over 30 years, I had ZERO reason to expect that moving files would break things so badly. I expected that AT WORST, if it did break, I’d simply need to move things back to where they were to fix things.

So, since I don’t have a backup and your advice doesn’t help me at all right now, how can I actually fix this? Thanks.

Everyone that uses Unreal to work in a team and version control, that’s who. The reason for this is that assets are binary data so only one person can be working on it at a time. If someone else is working on a file with a reference to the thing I’m trying to move the two simplest options “me wait on them” or “do it and break the asset” aren’t really good options. So instead, the Engine leaves a “redirector” in place at the old location so that the asset can see something and know where the data really lives. It allows us both to do our work and leaves some minor cleanup work for later in a way that doesn’t require either of us to modify our work.

If you have access to all the files, usually the Engine will update them all but sometimes it can’t. If those extra files are left around you should be able to right-click on the folder it’s in (or in the Content Browser where it would exist) and select “Fix-up Redirectors”. This will for the Engine to go and update all the files still looking at the old location. There are also view options so that you can see redirectors instead of seeing the folder as empty.

I don’t know why people were suggesting Migrate instead of Move. Where you trying to do it across projects? Move should be just fine if you were just trying to reorganize a project.

You should never modify the content directories through Explorer. Have you already cleared the deleted files from your trash? can you recover those and get them back so that you can run the Fixup-Redirectors process properly?

Thanks. I haven’t worked in a team yet so that never crossed my mind. Although, I can see it doing this for files that are in use by multiple people, but not if I’m the only person using them.

I have not emptied my trash yet. I’ve been wary of doing pretty much ANYTHING else for fear of breaking things further. So far the only thing I’ve done is try to import my project into 5.0 to see if that would maybe consolidate my assets into a new project folder.

I’ll give the Fix Up Redirectors thing a try. Thanks for the help.

you must use version control.

Assets and Packages | Unreal Engine Documentation, Redirectors | Unreal Engine Documentation.

NOTE
Moving or renaming Assets should be done in the Content Browser. If you rename, move, or delete an Asset file outside of the Editor, such as via your operating system’s file explorer, any Assets referencing the affected Asset will fail to find it, even if it still exists in the project.

Yeah, I was moving things in the content browser in Unreal. But it left all the original folders rather than actually move them. So it didn’t actually help me clean anything up. In Unreal these folders appeared empty but WOULD NOT delete. Because in reality they WERE NOT empty. I ONLY LEFT THE EDITOR BECAUSE I DIDN’T UNDERSTAND WHY IT WASN’T DELETING EMPTY FOLDERS. The only reason I found out they weren’t empty was because I deleted one through explorer. I mean, it was Empty in Unreal, why would I expect it to actually have files in it when I went to delete it in Explorer?

I get that you guys all understand this stuff so clearly now that you’ve been using Unreal for so long. But just TRY to imagine being a new user again. Why would a new person have ANY REASON to expect “Move” to function differently than the hundreds of other software applications they’ve been using for years? They would not expect their files to simply be copied somewhere else and have the original file locations be replaced with all new (and invisible apparently) files that just point to the new location. As far as I can recall, I have NEVER used any software that does that, so why would I have have any expectation that this would have happened?

As it was, this really bloody bothered me. But now that I’m trying to understand this version control stuff, I’m just getting insanely angry and frustrated. As someone new to all of this and struggling really hard to learn things, everything just feels so extremely overly complicated simply to make things over complicated. And finding actual useful information is proving to be extremely difficult because either the person responding expects me to know more than I do, or just tells me what I already know and doesn’t offer any guidance on progressing past that point. And with being new, I don’t even really know HOW to properly ask some questions in order to get useful answers from either real people or Google. It’s infuriatingly frustrating.

1 Like

stephen ullibari has a great intro to version control on udemy. thats probably the easiest intro you can get.

1 Like

oooh! Thank you! I’ll check it out!

Tough life lesson here, but an important one:

If something isn’t working the way you expect, the right answer is to find out why. Check on Discord, ask here, etc. Any of us could have explained it to you. But if, instead of searching/asking for answers, you simply assume that the engine/editor is not working correctly, and instead manually try to force things to work the way you think they should work by manually deleting files, etc., then you are asking for problems.

The good news is that it sounds like you just need to re-import the assets; not the end of the world.

Also most of us solo developers start using source control when we learn the hard way what happens when we don’t. Again, if this is just a matter of re-importing assets, it was a cheap lesson. Check out Perforce. It’s a great and powerful solution for source control and works great with Unreal.

Good luck!

This:

If you are solo developer, zipping whole project folder and giving that archive some meaningful name, like for eg: “MySpessShooter - touch interface working.zip” is much better than version control. You always can unzip that thing load and see what you broke or “improved” in wrong way since then, or get old formula etc.

That is why only answer i could give is “make backups!”.

ps.
Import only minimal number of assets and work on code and features, more assets, bigger zips or repository longer to build backup and update. I know we all need/want some pretty stuff in game, but do not overdo with it early.

1 Like

Is there no option to be able to do source control using my OneDrive? I already have like 8,000 subscriptions and seriously do not want any more if I can help it. I was watching a video showing stuff about setting up Perforce and it just seems so over-complicated purely to make things over-complicated. The one guy in the video said he only ever uses about $8 or $9 a month which works out to $11 or $12 CDN. Plus he’s a coder, not an artist so his projects are probably quite small. My current project is about 33GB due to all the assets and such. I literally have $100 - $150 worth of monthly subscriptions right now. It’s seriously disgusting. And I’m just one guy chasing a dream, I’m not a company with cash flow that can pay for ■■■■. I often go a couple months where I don’t manage to touch anything which means I’m pay over $100 a month for ■■■■ that’s not getting used. I REALLY don’t need to add to that.

And yes, I was able to fix it all up in a relatively easy, though tedious, way. I know I’m whining and ■■■■■■■■ horrendously. I’m just so incredibly frustrated.

Frankly I think this advice is terrible. Why waste so much space zipping up the whole project for changes that only modify a few files? Plus the built in tools for branching, merging, intergrations, version diffing… there’s just no comparison. I’m a solo developer (at least for my personal work) and couldn’t imagine working without source control.

I’m not sure. If you’re a solo developer, there’s a Perforce tier that’s free but I’m not sure if the functionality of the application is limited by the tier. It’s been a while since I setup my Perforce server, but I went with a simple local server that’s hosted on the same machine I’m working from. I should probably do something about that eventually but I like being able to work without worrying about having or not having an internet connection.

2 Likes

I made this mistake, too. It turns out, the reason they are still there, is that Unreal leaves “redirectors” in place when you move stuff, to generate fewer source control diffs. Any asset that references your asset, will NOT be updated; instead it will find the redirector, and follow it. There’s a separate option in the Unreal editor to “clean up redirectors” which will actually patch all assets to point to the real new location. Typically, you’ll do this once a week or something, and generate a single commit that updates all assets at once, so people don’t have to pull massive updates from source control all the time, because updating a referenced path will generate a full asset diff for binary assets.

So, if you want the empty folders to go away, fix up the redirectors, re-save everything, and then you can delete them.

1 Like

You could always just do a local Perforce server that backs up onto your OneDrive I guess? Or a local git repository could work too, purely for ease of rollbacks at least.

Game development is inherently a complicated beast, and P4 setup is almost easy relatively :slight_smile:

If you are solo developer, zipping whole project folder and giving that archive some meaningful name, like for eg: “MySpessShooter - touch interface working.zip” is much better than version control. You always can unzip that thing load and see what you broke or “improved” in wrong way since then, or get old formula etc.

I don’t understand your logic. What you are describing – the ability to look at prior versions and see what you broke – is precisely what Perforce and others allow you to do. What you are describing is much more cumbersome and a huge waste of disk space.

My project is about 80 GB. I am now up to commit #854. If I followed your approach, I would have 854 saves at an average size of roughly 40 GB, for a total of 34 Terrabytes. That’s insane. When you commit in Perforce, it makes a new save that only saves the specific assets that you modifed since your last commit, which is a huge savings in disk space. You not only have the ability to move back and forth between your various commits, but with respect to C++ files, it will show you precisely what code changed from one commit to the next.

There’s just no advantage to what you describe. Not to criticize, but from your answer, it sounds like you may not be familiar with Perforce?

Yes and no. Unpacking whole thing is faster, for single person or two, this is easier.

Now try to get some version from around commit #100. Also hrarddrives are quite cheap recently.

Getting a version from commit #100 is super simple.

Unpacking is not faster.

I am a solo dev, and Perforce is much easier than what you describe.

Seriously, give it a try. You’ll be surprised.

There is nothing faster, easier, or more flexible than version control.

A solo dev especially needs to guard their time, and even a project of just a couple gb’s will waste significant time zipping, downloading, uploading - not to mention with manual backups you have no diff log so figuring out which tiny change broke your project will be an absolute chore without version control.

Version control makes life easier and empowers debug process - not the opposite.

I am a solo developer, I use github desktop app because it’s really easy and storage on git is cheap. If I wasn’t using version control, not only would I exist in a constant state of dread, but my productivity would be tremendously hampered.