Editor loads assets, game doesn't.

I’m at a complete loss here. I what would cause this? To re-iterate. The editor loads my assets fine, or the game when launched through the editor via the command line (editor.exe -game), but if I launch my game or through the editor via the launch button none of my resources load.

Is this happening for all resources, or only some (eg, those used by Slate)?

I’m pretty sure for all resources, but I’ve only imported/used what is being used by Slate. So yes, only slate, but I think it’s a larger issue (all resources).

Would moving my project to a different directory cause this to happen (It was on my D drive but I moved to C).

I’ll try adding some meshes/textures to the game and seeing if they load.

Ah, yes, that would’ve done it.

It’s strange that running the game in the editor lets you do that though. I’ll raise a bug to investigate that.

Thanks.

I found out that Slate UI Brushes have to be in the
/Game/UI
directory, or sub-directory as the engine searches sub-directories recursively.

I had my slate brushes in /Game/Slate/Spells, so while the editor didn’t care where UI brushes are the actual game did.

The problem was that the editor cooks(bakes?) Slate resources only from these directories (taken from editor.ini)

[UI]
ContentDirectories=/Game/UI
ContentDirectories=/Game/Widget
ContentDirectories=/Game/Widgets
ContentDirectories=/Engine/MobileResources

Evidently the brushes were not being cooked (baked?). My options were either 1) add /game/slate to the editor.ini list above, or 2) move resources to /Game/UI. I chose the latter, I don’t think Epic really wants us messing with the .ini files though (can cause strange bugs), so it’s recommended that Slate UI resources go in /Game/UI. The editor doesn’t require resources be cooked, so that’s why it was working with the editor and not the game.

I’m not sure it’s a “bug”, Slate is better off if it isn’t loading all the entity of the game’s content (just to avoid this behavior). I’ll be updating the/my wiki page soon with a suggestion to put UI conent in /Game/UI/…

If you really wanted to you could create the /filesystem/project/content/ui/ directory by default on project creation and put a readme in there that just says “UI content must go here.”