Why is my resources cleared each time I build the editor?

Hey everyone :slight_smile:

I’m quite new to UE4, and I have a weird problem. Perhaps it’s a really stupid thing I’ve overlooked, but I don’t get it.

So, I started a blank code project (The one that comes with some basic framework classes). The problem is, when I compile the editor and go to set up my folder structure in the content browser, and import some project textures and so on and then at some point re-compile the editor (when I add new classes and whatnot), all resources are gone. The content browser just has a blank project structure, as if I just started a new project.

What gives?

Hey Beagle-

I’m trying to make sure I understand your question. Are you compiling the editor before setting up your folder structure? Also when you say that the content browser has a blank project structure, does that mean that the basic content from creating the project are missing as well?

Hey , nice of you to reply :slight_smile: I should have been more specific. Basically, this happens when I create a “Basic Code” project from the launcher. So yes, I do indeed compile the editor as the very first step. When the editor is compiled and opened, I then start to set up my folder structure in the content browser. It is blank to begin with (Showing only the root “Game” folder as per default"). Though I would expect this as I did not ask it to include any content upon project creation. As I now set up the folder structure and import assets (textures, audio, sprites, etc), I then save the level and exit it. If I then re-compile the editor and it opens back up in my level, all assets and folders I created/imported are simply gone, as if I had just launched a new project.

Hey Beagle-

I’m having some trouble trying to reproduce your issue on my end. Just so I know we are working in the same conditions, what configuration (debug/shipping/development/etc.) and platform (Win64/Mac/IOS/etc.) are you building your project in? Also when importing assets you can use the save icon at the top of the content browser to specifically save the assets. Another method would be to use “Save All” in the File menu as this saves both your level as well as assets.

And, as a reminder, you only need to re-compile if you change any of the code in your project. Adding assets should not require you to re-compile.

Hey :slight_smile: Been a busy week! However I think I have narrowed down the problem. Well, to some extend. I created a new project and ever since it has been working great. I also noticed some behaviour in the editor that I can replicate each time. If you create new folders in the content browser but do not populate them with files, they will automatically be deleted when you re-compile the editor. Is this intended behaviour? Sometimes I enjoy setting up standard folder structure at the beginning of the project :slight_smile: I suppose I can see the logic in that it prevents a project from being populated - accidentally - with a lot of unused folders :smiley: I’m slowly learning the workflow of the engine, and it’s really great. It has a lot of potential, especially with the subscription model that is used!

Hey Beagle-

To answer your question yes, it is intended that an empty folder not be visible in the content browser. However the folder still exists in the project. If you navigate to where the project is saved on your computer and go into the Content folder you will find the empty folder. Placing some asset into this folder will then make it appear in editor. Glad to hear you are enjoying the editor and wish you luck in your projects.

Cheers.