Game modes not being loaded from UObjectLibrary

So I decided to load maps (or levels) and game modes directly from assets folder.
I had no problems with levels, they are perfectly being loaded while PIE and grabbed by level controller (my magic automatic class for server).
But game modes ain’t found by UObjectLibrary. Literally. I double checked everything.


So, declarations (somewhere in .h):

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Level Controller")
TArray<FString> gameModesPaths;
UPROPERTY()
class UObjectLibrary * gameModesLibrary;

Definitions:

// ... Constructor
gameModesPaths.Add("/Game/Content/GameplayClasses/GameModes");
// ... BeginPlay
gameModesLibrary = UObjectLibrary::CreateLibrary(ARayGameModeBase::StaticClass(), true, GIsEditor);
	if (gameModesLibrary->LoadAssetDataFromPaths(gameModesPaths) == 0)
		if (GEngine)
			GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, "No assets derived from ARayGameModeBase found");
	if (gameModesLibrary->LoadAssetsFromAssetData() == 0)
		if (GEngine)
			GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, "No assets derived from ARayGameModeBase loaded");

For those who lost in this mess: first I declared paths where to search for classes (objects) derived from ARayGameModeBase; then called CreateLibrary with support for Blueprint classes (there are some blueprint classes derived from this C++ one); finally I attempted to check if number of found assets returned by LoadAssetDataFromPaths isn’t equal 0.
LoadAssetsFromAssetData returns 0 no matter what, means it found nothing.
Absolutely the same algorithm is used to load maps. Maps begin loaded just fine, I can travel between them using their asset names.
I checked everything:
Paths - OK;
Base class and game modes in folder have this class as parent - OK;
Truly scientific “let’s make this like that and check if it works” in many variations - OK;

What am’I doing wrong? Even game modes should be spawned classes in content, ain’t they?

I got the same problem as yours.

	UObject* LoadObj = LoadObject<UObject>(NULL, TEXT("/Game/texture/hx1.hx1"));
	if (LoadObj != nullptr)
	{
		GLog->Log("  LoadObj->GetFName() "+LoadObj->GetFName().ToString());
		GLog->Log("  LoadObj->GetPathName() " + LoadObj->GetPathName());
		GLog->Log("  LoadObj->GetFullName() " + LoadObj->GetFullName());
		GLog->Log("LoadObjectsFromArry() LoadObj is loaded!");
	}


	int objsNum = objLibrary->LoadAssetDataFromPath(TEXT("/Game/texture/"));
	int objsNum2 = objLibrary->LoadAssetDataFromPath(TEXT("/Game/texture/hx1.hx1"));
	int objsNum3 = objLibrary->LoadAssetDataFromPath(TEXT("Texture2D /Game/texture/hx1.hx1"));


	GLog->Log(FString::FromInt(objsNum));
	GLog->Log(FString::FromInt(objsNum2));
	GLog->Log(FString::FromInt(objsNum3));

And the log is
[2017.07.14-10.19.18:660][246] LoadObj->GetFName() hx1
[2017.07.14-10.19.18:660][246] LoadObj->GetPathName() /Game/texture/hx1.hx1
[2017.07.14-10.19.18:660][246] LoadObj->GetFullName() Texture2D /Game/texture/hx1.hx1
[2017.07.14-10.19.18:660][246]LoadObjectsFromArry() LoadObj is loaded!

[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]No Objs!LoadObjectsFromArry failed!

LoadAssetDataFromPath always failed but LoadObject(NULL, TEXT("/Game/texture/hx1.hx1")) is OK

[2017.07.14-10.19.18:660][246] LoadObj->GetFName() hx1
[2017.07.14-10.19.18:660][246] LoadObj->GetPathName() /Game/texture/hx1.hx1
[2017.07.14-10.19.18:660][246] LoadObj->GetFullName() Texture2D /Game/texture/hx1.hx1
[2017.07.14-10.19.18:660][246]LoadObjectsFromArry() LoadObj is loaded!
[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]0
[2017.07.14-10.19.18:671][246]No Objs!LoadObjectsFromArry failed!