Development binaries require cooked content

Hi! Is it really required? My workflow: 1) Compile game using DevelopmentEditor conf. in VS; 2) Run Editor via VS; 3) Do some stuff, recompile my Game-Editor.dll and hot reload it; 4) Compile game using Development conf. ← it requires cooked content from Saves/… (Cooked or Stage or whatever folder). ???

With Development configuration Game.exe in Binaries/Win64 produced. Why I cannot start it to use content from Content/ and not from Saves/ ?

The error is: [2015.12.08-09.55.47:048][ 0]LogLinker:Warning: Unable to load package (…/…/…/Project/Content/Mods/Common/HUD/crosshair.uasset). Package contains EditorOnly data which is not supported by the current build.

Hello,

I’m having a bit of trouble understanding exactly what it is you are trying to do. Could you provide some clarification on your steps? Specifically steps 3 and 4, if possible.
Also, if you could explain what you mean by "start it to use content from Content/ and not from Saves/, that would be helpful.

Thank you.

I mean that Development-compiled Game.exe can run only using cooked data, not editor data. By data I mean assets. I investigated this and found that windows platform has ‘EditorOnlyData’ #define - somewhere in WindowsPlatform headers. So, it does not allow standalone game to use editor assets.

Do you understand now?

The question is: Why?

From my POV development builds should run on editor data (or both - editor+cooked), shipping builds should run only on cooked data.

When we build MyGame.exe (monolithic, no DLLs), we treat it like a “console” style build, which is what you would ship, which doesn’t need to load editor data, and uses cooked data. We don’t want to make a Development build of MyGame.exe and a Shipping build of MyGame.exe so radically different.

You could modify UBT to compile MyGameEditor.exe as a monolithic executable that can load uncooked data.

I guess my question is, why do you want your standalone game to load editor data, without being the editor itself? You can run the editor with -game to make it act like a game, while loading uncooked data.

For what it’s worth, we are actively working on getting cooking deterministic. Some assets are generating GUIDs or unique object names during cooking. For some of the asset types, just resaving them in the editor (or a commandlet to resave all packages) is enough to stop the GUID/name generation.

We also have just come up with a commandlet that will look for non-determinism by cooking multiple times, etc. (In 4.11)

Josh

You could modify UBT to compile MyGameEditor.exe as a monolithic executable that can load uncooked data.

I tried some steps in this direction, but did not succeed yet.

why do you want your standalone game to load editor data, without being the editor itself?

I’m trying to do this because I’d like to deliver some proof of concept builds to users (they do not have UE4 installed) quite often. Cooking data every time modifies each file (probably updated date and time). The difference is in a few bytes only. I developed some bootstrapper (or downloader), so it can update only changed files using hashes. As you can see, if file has single changed byte, its hash will be different, and users will downloads GBs of data each time instead of only changed files (1 map, some models). Editor data here is remaining unchanged while cooking updates all files every time.

I’m thinking now about some use of bittorrent protocol instead of manually written, so users will get REALLY only changed blocks (each of 4 MB for example).

Upd.: And I cannot use rsync protocol directly for several reasons.

Nice to hear. Thank you for the answers.

Hi lzwdgc ! Do you realize how to work with uncooked objects now?

Hi Izwdgc,

Development builds don’t have the editoronly data so they can’t use editor content.
Serialization will cause incorrect code path.
The large difference between cooked and uncooked content is the stripping of editor data and inlining of specific types of data (textures / materials).
For this reason only the editor which has editoronly data defined to true, can load the uncooked packages.

You could do your internal development builds editor with editor content and use -game to run the game.

We have been working on deterministic cooking and getting the output to be similar to the input. Perhaps you have a specific issue caused by some build settings which is causing every package to be updated erroneously?

Can you confirm that the cooker flags include -unversioned?

Hi,

Can you confirm that the cooker flags include -unversioned?

Sorry, couldn’t do that at the moment.

The original idea was simple: cooking takes too long and I wanted to ship my development builds to early users frequently, so they’ll try to run game without UE4 installed. At the time of creation of this ticket cooking was not deterministic (didn’t check it with 4.13), so users should download all the stuff again and again (file hashes were changed). With development build I made changes only for several files and users in theory will re-download only them and I also should not cook all the contents every 10 mins (when it takes 4+ hours long).

I’ll check -game switch later, thanks.