Package contains EditorOnly data which is not supported by the current build

I’ve checked the questions regarding EditorOnly data not supported by the current build.
I cannot find any solutions.

I’m trying to load a font in the HUD.

void AKHUD::PostInitializeComponents()
{
	Super::PostInitializeComponents();

	// Initialize all fonts
	UFont* roboto = LoadObject<UFont>(NULL, TEXT("/Game/Fonts/Roboto.Roboto"), NULL, LOAD_None, NULL);

The configuration is “DebugGame Client”.
The project has been cooked successfully.

The font is not loaded and I receive the following message :
LogLinker:Warning: Unable to load package (…/…/…/…/…/GitHub/UnrealEngine/…/…/KadeoGames/UDK/KSGM/Content/Fonts/Roboto.uasset). Package contains EditorOnly data which is not supported by the current build.

Is there any restrictions loading assets in Debug mode ?

Txs for your help,
D.

If you make the font a UPROPERTY and assign it in the editor then repackage does it work?

I’m only working in C++.
I will try to create a class with a UPROPERTY() var and assigned it using the editor and cook the content with Front End to see if it changes.

I work mainly in c++ also by having data like fonts assigned via the editor makes it very easy to change them and see the results

Am a little confused as to how you got editor only data in you game package though. Did you do anything by hand while packing?

Finally I found the solution.
I’ve found in another question that you need to place the assets within a directory called “Slate”.
My fonts where under /Fonts directory.
I’ve created a directory /Slate and moved the Fonts directory under /Slate and re-cooked the assets and it is working.

Txs and have nice day,
D.